URGENT - access date of birth validation

M

MINA

Hello

I would like to create a date of birth field where the validation should be

user enters their date of birth like: 27-11-1969 and the rule should
calculate if the birth date is younger than 18 or older then 65 if should
warn and not allow the entry.

so if I enter 02-04-2000 I should get a warning.

I am very new to Access I have tried a few things but not sure where to
write this rule, I assume it will be in the date sheet as a validation rule..

Millions of thanks
 
O

Ofer

Hi Mina
Open the table in design view, and focus on the date field.
One of the properties is ValidationRule Property, in it write
Between DateAdd("yyyy",-18,Date()) And DateAdd("yyyy",-65,Date())

In the ValidationText Property write the message you want to be displayed
 
M

MINA

I am so pleased thanks very much I think it works.. now I have to figure out
how Access to come up with a better promtp when the user enters a value
outside the rule.. like a caption caming more meaning full etc.. But thanks
very much..

Mina
 
O

Ofer

As you can see in the prev post, you can use the ValidationText Property to
write a message you want to be displayed when there is an error
--
If I answered your question, please mark it as an answer. That way, it will
stay saved for a longer time, so other can benifit from it.

Good luck
 
M

MINA

hello

would you consider giving few hours training on Access 2003 for later today,
Sat , Sun or Monday in London?

Thanks
 
O

Ofer

Supply a return ticket and I'm there.

mybe next time, but thanks for the offer
Ofer

Good luck
 
M

MINA

Hello

A new question on NI numbers and validation assuming below

National Insurance Number
1. Must be 9 characters.
2. First 2 characters must be alpha.
3. Next 6 characters must be numeric.
4. Final character can be A, B, C, D or space.
5. First character must not be D,F,I,Q,U or V
6. Second characters must not be D, F, I, O, Q, U or V.
7. First 2 characters must not be combinations of GB, NK, TN or ZZ (the term
combinations covers both GB and BG etc.)

and how do I write a validation rule on this!!! Sorry for the stream of
questions...

Thanks
 
O

Ofer

Israel,

Now about your other question, are you serious?
If you are, I wont be able to help you today, you can start a new post,
there are amazing people here that I'm sure will help you.
If no luck then I will be able to come back to you tomorow

Sorry
Good luck
 
M

MINA

Hi

Wow.. you are far! not sure if I can afford the fare..

I had problems starting a new post but just now have created one.. Anyway..
so we will see what happens.. Your answers for tomorrow will be OK too..

Thanks again

Mina
 
Top