B
Bilbo
I have created an auto age calculation using access help. It is in forms.
How can i use the calculation in a table?
How can i use the calculation in a table?
How did you create the auto age calculation? I need to do this, too.
John Vinson said:How did you create the auto age calculation? I need to do this, too.
You can calculate the age in a Query by typing:
Age: DateDiff("yyyy", [DOB], Date()) - IIF(Format([DOB], "mmdd") >
Format(Date(), "mmdd"), 1, 0)
all on one line in a vacant Field cell in a query.
The Age should NOT be stored in a table field. If you store an age
today, it will certainly be WRONG in a year. Just calculate it on the
fly.
John W. Vinson[MVP]
I copied the formula exactly into a blank field in my form (which gets it's
data from a table - does that make a difference?) and I get a "#Name?"
showing up in the field. What am I doing wrong?