I am trying to put some code on a date field, so that a date in the future cannot be accidentally typed in. If the date is in the future, I want a message box to appear, and the control to be cleared for a new (correct) date entered. The message box pops up, but the control doesn't clear. Any suggestions?
Private Sub InvoiceDate_BeforeUpdate(Cancel As Integer)
If Me.InvoiceDate > Now() Then
MsgBox "Invoice Date Cannot be in the future. Please adjust."