Folks
For some reason, the following code works ...
Code:
If DLookup("ReviewDate", "ReviewDateTable", "DocumentID = " & Me.Parent!DocumentID.Value) = Me!ReviewDate.Value Then _
MsgBox "This review date has already been entered for this document.", vbInformation
... but this doesn't ...
Code:
If DCount("ReviewDate", "ReviewDateTable", "DocumentID = " & Me.Parent!DocumentID.Value & "And ReviewDate = " & Me!ReviewDate.Value) > 0 Then _
MsgBox "This review date has already been entered for this document.", vbInformation
To be more specific, in the first instance it's recognized that the review date is already in the table, but in the second instance it isn't recognized. Can anyone help me as to why? (For info, I need something akin to the second, as each document can have several review dates.)
Thanks
Remster