Private Sub CmdTambah_Click() If TxtNama.Text = "" Then MsgBox "Nama belum di isi!", vbCritical, "Peringatan!" ElseIf TxtAlamat.Text = "" Then MsgBox "Alamat belum di isi!", vbCritical, "Peringatan!" ElseIf TxtNo.Text = "" Then MsgBox "Nomor Telepon belum di isi!", vbCritical, "Peringatan!" ElseIf MsgBox("Apakah anda ingin menambahkan kontak?", vbYesNo, "") = vbYes Then FormUtama.Adodc1.Recordset.AddNew FormUtama.Adodc1.Recordset!Nama = TxtNama.Text FormUtama.Adodc1.Recordset!Alamat = TxtAlamat.Text FormUtama.Adodc1.Recordset!NoTelp = TxtNo.Text MsgBox "Kontak Berhasil di Simpan", vbInformation, "Kontak Tertambah" Bersih Else End If End Sub Private Sub CmdKembali_Click() Unload Me End Sub Sub Bersih() TxtNama.Text = "" TxtAlamat.Text = "" TxtNo.Text = "" End Sub Private Sub CmdKe
Komentar
Posting Komentar