Jumat, 06 Mei 2016

Listing Program Laporan Akhir Database pada Visual Basic

Berikut ini adalah Listing Program Laporan Akhir Database pada Visual Basic :

FORM 1 :



Private Sub Command1_Click()
a = MsgBox("Data yang di pilih akan dihapus, Yakin ?", vbYesNo, "Peringatan!")
If a = vbYes Then
Adodc1.Recordset.Delete
End If
End Sub

Private Sub Command2_Click()
Adodc1.Recordset.AddNew
Adodc1.Recordset!kode_matkul = Text1.Text
Adodc1.Recordset!nama_matkul = Text2.Text
Adodc1.Recordset!dosen = Text3.Text
Adodc1.Recordset.Update
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
End Sub

FORM 2 :

Private Sub Command1_Click()
If Text1.Text = "rosiyana" And Text2.Text = "56415276" Then
MsgBox "Selamat Datang Rosiyana", vbYes, "Hai"
Unload Me
Form1.Show
Else
MsgBox "Username atau password anda salah!", vbCritical, "warning"
End If
End Sub


Tidak ada komentar:

Posting Komentar