automating age calcs

krowe

Registered User.
Local time
Today, 03:31
Joined
Mar 29, 2011
Messages
159
Hi

I have a table with fields for DOB and Age.

On the form I would like to automate the age based on the DOB. I have this formula that was in an unbound field and worked, but i cant get it to work on the bound field:

=DateDiff("yyyy",[DOB],Now())+Int(Format(Now(),"mmdd")<Format([DOB],"mmdd"))

Additionally, I dont always have the DOB, so i want to be able to type an age in too, (however the priority should be to calc the age if the dob exists).

Please could you help?

Thanks
 
Hi again

dont worry about answering this.

Ive decided to keep age in an unbound box as it is. Will change the process to ensure DOB is always known
 
Some info on Age Calculation for the future even though you have it solved.

You don't want to save age in a table anyway as it is dynamic. It can always be calculated. Only raw data should be stored in tables.

http://www.fontstuff.com/access/acctut05.htm

Alan
 

Users who are viewing this thread

Back
Top Bottom