How to check if date is > year 2000

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

Guest

I have a field on a form with these to properties set:
format - mm/dd/yyyy
input mask - 99/99/00;0;*
I would like to know how to check if the year is > year 2000?

Can I just say:
IF BirthDate > 01/01/2000 then
msgbox "error"
End IF

Or is there another way to do this?
 
You can do it that way.

You could also use the validation rule in the forms to say it must be before
01/01/2000.
 
I have a field on a form with these to properties set:
format - mm/dd/yyyy
input mask - 99/99/00;0;*
I would like to know how to check if the year is > year 2000?

Can I just say:
IF BirthDate > 01/01/2000 then
msgbox "error"
End IF

Or is there another way to do this?

A third answer: use the # delimiter for date literals.

If Me![BirthDate] > #1/1/2000# Then

John W. Vinson[MVP]
 

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

Date Mask auto changes 1916 to 2016 2
detecting date style 2
Input Mask 3
How to check if a date is valid? 10
Form with filter 4
printing report with date 3
Converting Date to Julian 4
Need current year 7

Back
Top