Heatshiver
Registered User.
- Local time
- Today, 09:43
- Joined
- Dec 23, 2011
- Messages
- 263
I am trying to use the following code to check if a UserID and Date have been used together:
If DCount("*", "tblGenSum", "[UserID]=" & Me.UserID & " And [Days]=" & Me.Days) > 0 Then
MsgBox "Day already used."
End If
However, I continue to get a data type mismatch. The UserID is numerical, and Days is a date. Other than that, The UserID on the form initially comes from a different form's value.
Any help would be much appreciated. Thank you!
If DCount("*", "tblGenSum", "[UserID]=" & Me.UserID & " And [Days]=" & Me.Days) > 0 Then
MsgBox "Day already used."
End If
However, I continue to get a data type mismatch. The UserID is numerical, and Days is a date. Other than that, The UserID on the form initially comes from a different form's value.
Any help would be much appreciated. Thank you!