|
Durmad share Progam VB database
|
|
08-04-2012, 10:43 PM
|
|||
|
|||
|
TUGAS UTS VISUAL BASIC SEMESTER 2 (PROGRAM DATABASE)
http//:herimuriyano.files.wordpress.com/2010/12/gambar-progam.jpg CODE PROGRAM Private Sub cmdtambah_Click() txtnoinduk.Text = “” txtnama.Text = “” cbojk.Text = “” txttempatlahir.Text = “” txttanggallahir.Text = “” cboagama.Text = “” txtalamat.Text = “” txtnotlp.Text = “” txtnamawali.Text = “” txtpekerjaan.Text = “” txtalamatwali.Text = “” cbostatus.Text = “” txttahunmasuk.Text = “” cbokelas.Text = “” txtwalikelas.Text = “” txtnoinduk.SetFocus End Sub Private Sub cboagama_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then txttahunmasuk.SetFocus End If End Sub Private Sub cbojk_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then txttempatlahir.SetFocus End If End Sub Private Sub cbokelas_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then txtwalikelas.SetFocus End If End Sub Private Sub cmdedit_Click() With Data1.Recordset .Edit End With End Sub Private Sub cmdsimpan_Click() With Data1.Recordset .AddNew End With End Sub Private Sub cmdkeluar_Click() PSN = MsgBo “ANDA YAKIN INGIN KELUAR?”, vbCritical + vbYesNo, “PESAN”)If PSN = vbYes Then Unload Me End If End Sub Private Sub cmdhapus_Click() Data1.Recordset.Delete Data1.Recordset.MoveFirst End Sub Private Sub Form_Load() cbojk.AddItem “Laki-laki” cbojk.AddItem “Perempuan” cboagama.AddItem “Islam” cboagama.AddItem “Protestan” cboagama.AddItem “Katholik” cboagama.AddItem “Hindu” cboagama.AddItem “Budha” cboagama.AddItem “Konghucu” cbostatus.AddItem “Anak Kandung” cbostatus.AddItem “Anak Angkat” cbokelas.AddItem “VII” cbokelas.AddItem “VIII” cbokelas.AddItem “IX” End Sub Private Sub mnexit_Click() PSN = MsgBo “ANDA YAKIN INGIN KELUAR?”, vbCritical + vbYesNo, “PESAN”)If PSN = vbYes Then Unload Me End If End Sub Private Sub txtalamat_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then txtnotlp.SetFocus End If End Sub Private Sub txtalamatwali_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then cbostatus.SetFocus End If End Sub Private Sub txtnama_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then cbojk.SetFocus End If End Sub Private Sub txtnamawali_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then txtpekerjaan.SetFocus End If End Sub Private Sub txtnoinduk_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then txtnama.SetFocus End If End Sub Private Sub txtnotlp_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then txtnamawali.SetFocus End If End Sub Private Sub txtpekerjaan_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then txtalamatwali.SetFocus End If End Sub Private Sub txttahunmasuk_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then cbokelas.SetFocus End If End Sub Private Sub txttanggallahir_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then cboagama.SetFocus End If End Sub Private Sub txttempatlahir_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then txttanggallahir.SetFocus End If End Sub Private Sub txtwalikelas_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then txtalamat.SetFocus End If End Sub
Berhentilah mengejar apa yang tak mungkin, bersyukur dengan apa yang didapat sekarang, belajar membuka pontensi dalam diri. life is choice.. your life is your choice.
|
|||



“ANDA YAKIN INGIN KELUAR?”, vbCritical + vbYesNo, “PESAN”)


![[+]](images/collapse_collapsed.gif)