I have searched for and found several examples, but none that help me.
My Base table (tbl_base) has a Date/Time field (dd/mm/yyyy) named "Date" My data entry form is based on tbl_base with various subforms linked. When a user enters a new record, I need it to check if one exists for that date using the following code on Before Update Property:-
If DCount("Date", "tbl_base", "Date='" & Me.Date & "'") Then
MsgBox "A Record For This Date Exists" & _
vbCrLf & " Please Add Any Additional Information On The Browse Form. ", _
vbOKOnly, "Duplicate Entry Warning"
Cancel = True
Me.Undo
Exit Sub
Else End If
I get a data type mismatch error.......Why ?
Grateful for any help.
Dave
My Base table (tbl_base) has a Date/Time field (dd/mm/yyyy) named "Date" My data entry form is based on tbl_base with various subforms linked. When a user enters a new record, I need it to check if one exists for that date using the following code on Before Update Property:-
If DCount("Date", "tbl_base", "Date='" & Me.Date & "'") Then
MsgBox "A Record For This Date Exists" & _
vbCrLf & " Please Add Any Additional Information On The Browse Form. ", _
vbOKOnly, "Duplicate Entry Warning"
Cancel = True
Me.Undo
Exit Sub
Else End If
I get a data type mismatch error.......Why ?
Grateful for any help.
Dave