G
Guest
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?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Bilbo said:I have created an auto age calculation using access help. It is in
forms. 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?
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.