Date Function (Validate date entered)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I'm trying to prevent someone from entering data into Date Handled that is a
future date i.e. greater than today. I've tried swapping Date with Today,
and it doesn't seem to work. I can only enter in todays date (May 5), I
can't enter May 1.

Any suggestions?

If Me.Date_Handled > Date Then
Cancel = True
MsgBox "Date Handled must be equal or less than today"
End If

Thanks!
 
Co code needed. In the table or form use Validation Rule of <=Date() and
it will not allow future date. You can also add your custom message to the
Validation Text.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top