I have several if statements checking the dates entered against each other (there is a logical progression, where, for example, a record cannot be completed before it is received. Also, I check against the system date to make sure the user doesn't enter a future date.
I use the following code on the before update event, and it works perfectly.
Private Sub DateReceived_BeforeUpdate(Cancel As Integer)
If DateReceived > Date Then
MsgBox "Date Received cannot be in the future"
Cancel = True
End If
End Sub
But when I try to put the same logic in a macro to run prior to saving, I get an error message
"Quality Review Database cannot find the name 'Date' you entered in the expression."
Is there different syntax when referring to the system date within a macro?