calculate age in loaded form

action

Registered User.
Local time
Tomorrow, 12:44
Joined
May 29, 2003
Messages
89
How can I calulate an age for a loaded form (with DOB in form) without using a query. I can do it with this: Year(Now( ))-Year([DoB]) in a query but get no where when trying to caculate it on the form.

Ideas anybody?
 
I assume you have a textbox where you want to show the Age.
Place the following in the "Control Source" of the textbox:
= DateDiff("yyyy", [DOB], Date()) + (Date() < DateSerial(Year(Date()), Month([DOB]), Day([DOB])))
 
works

works a treat, thanks
 

Users who are viewing this thread

Back
Top Bottom