hello everyone i need help about msgbox "Insufficient Data" coding.
below is my coding:
Private Sub cmdSave_Click()
On Error Resume Next
Adodc1.Recordset.AddNew
Adodc1.Recordset!Dateregistration = txtDate.Text
Adodc1.Recordset!Title = cmbTitle.Text
Adodc1.Recordset!Name = txtName.Text
Adodc1.Recordset!Ic = txtIc.Text
Adodc1.Recordset!Email = txtEmail.Text
Adodc1.Recordset!Phonenumber = txtPhone.Text
Adodc1.Recordset!Address = txtAddress.Text
Adodc1.Recordset!Address1 = txtAddress1.Text
Adodc1.Recordset!Residential = cmbResidential.Text
Adodc1.Recordset!Gender = cmbGender.Text
Adodc1.Recordset!Numberofrooms = cmbNumber.Text
Adodc1.Recordset!Rentalprices = txtRental.Text
Adodc1.Recordset.Update
MsgBox "Successfuly Save!!!", vbInformation
End Sub
im using adodc connection:
Private Sub Form_Load()
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\sistempengurusanrumahsewa.mdb;Persist Security Info=False"
Adodc1.RecordSource = "Select * from owner"
Set DataGrid1.DataSource = Adodc1
End Sub
my main problem is how to add msgbox "Insufficient Data" if a field is empty??
thanks.