I am trying to force users into inputting 2 rows of data into a form, once they have pressed the exit button I don't want the form to close i want the user to be able to input more data on to a blank form.
I've never used DCount before as I am new to the VB side of Access but this is what i've tried (and several variations!)....
Private Sub ExitButton_Click()
Dim Count
If Count(DCount("[StaffOrChildID]", "dbo_EmergencyContacts")) = 2 Then
MsgBox ("You Need to Input Another Emergency Contact")
End If
End Sub
I've never used DCount before as I am new to the VB side of Access but this is what i've tried (and several variations!)....
Private Sub ExitButton_Click()
Dim Count
If Count(DCount("[StaffOrChildID]", "dbo_EmergencyContacts")) = 2 Then
MsgBox ("You Need to Input Another Emergency Contact")
End If
End Sub