Selasa, 03 Mei 2016

Contoh listing program LA dari LAB TI

Private Sub Command1_Click()
If Text1.Text = "Admin" And Text2.Text = "admin" Then
MsgBox "Halo...!!!", vbInformation, "Login"
Unload Me
Form2.Show
End If
End Sub

Private Sub Command1_Click()
Adodc1.Recordset.AddNew
Adodc1.Recordset!Kode_Matkul = Text1.Text
Adodc1.Recordset!Matkul = Text2.Text
Adodc1.Recordset!Dosen = Text3.Text
Text1.Text = " "
Text2.Text = " "
Text3.Text = " "
End Sub

Private Sub Command2_Click()
A = MsgBox("Data yang dipilih akan dihapus, Yakin?", vbYesNo, "Peringatan")
If A = vbYes Then
Adodc1.Recordset.Delete
End If
End Sub

Tidak ada komentar:

Posting Komentar