calculate age

G

Guest

I'm new to this: need to calculate age from date of birth. Tried the Help
suggestion but get #NAME error when I apply it. Any suggestions? My 2 field
names are" Date of Birth" and "Patient Age".
thanks!
 
J

John Vinson

I'm new to this: need to calculate age from date of birth. Tried the Help
suggestion but get #NAME error when I apply it. Any suggestions? My 2 field
names are" Date of Birth" and "Patient Age".
thanks!

Patient Age should NOT be stored in your Table, *at all*. If you store
it today, it will be wrong in less than a year.

Instead, it should be *calculated* as needed in a Query, or in the
Control Source of a textbox on a form or report, using an expression
like

Patient Age: DateDiff("yyyy", [Date Of Birth], Date()) -
IIF(DatePart("y", [Date Of Birth]) > DatePart("y", Date()), 1, 0)

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top