Calculate age in a form field

bellemmar

Registered User.
Local time
Today, 12:46
Joined
Mar 9, 2011
Messages
64
Hi,
I'm trying to have a field automatically calculate age (in years) from the birthdate field. I've figured out how to do the query; I'm hung up on having it work in a form. Can I just paste the query code into the form's age field?
Thanks for any assistance.
MK
 
You can place this in the ControlSource of the Age text box (unbound)
txtBOD = Bate of birth (can be bound
txtAge Unbound

=DateDiff("y",Year([txtBOD]),Year(Date()))
 

Users who are viewing this thread

Back
Top Bottom