Validation rule

burnoutuk

Registered User.
Local time
Today, 18:41
Joined
Oct 17, 2003
Messages
23
I want a validation rule which makes it so that if a date of birth is entered that means the persons age is under 21 a msgbox pops up.

I got the macro setup and this is my code im using
Year([dob])>=Year(Date())-21

This only sees if the date entered's year is more than 21 years ago though not the day or month.

Anyone know what i need?

Thanks :)

Edit: not sure if this is the right place for this if it isnt please say and ill delete.
 
DateDiff("yyyy", [dob], Date()) + Int(Format(Date(), "mmdd") < Format([dob], "mmdd"))<21
 
:D Thank you
 

Users who are viewing this thread

Back
Top Bottom