How to check if date is > year 2000

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?
 
R

Rick B

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.
 
J

John Vinson

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


Top