Age Calculation

tjnichols

Registered User.
Local time
Today, 13:05
Joined
Apr 18, 2012
Messages
57
Hello. I have several databases that I need to calculate the ages for. I have attached it for your review. This specific database has the age calculation in the "consumers" table.

The code that I have is "Expr1: DateDiff("yyyy",[Me].[BirthDate],DateAdd(6,"m",[Me].[CurrentDate]))". I have this to update the age "BeforeUpdate" in the form.

As you can tell, I haven't a clue what is wrong.

Thanks for your help!

Tonya Nichols
 

Attachments

Here's some other choices:
DateDiff("yyyy", [DateofBirth], Date())+ Int( Format(Date(), "mmdd") < Format( [DateofBirth], "mmdd") )
From dipetete on UtterAccess
Int((Format(Now(),"yyyymmdd")-(Format([DateOfBirth],"yyyymmdd")))/10000)
From Merle Nocholson on UtterAccess
Int(Format(Now(),"yyyy.mmdd")-(Format([DateOfBirth],"yyyy.mmdd")))
 
I have followed the instructions from another post (Thank you Brian Whatnot!) but it doesn't automatically update. The ages are there in a dropdown but the age field isn't automatically populated. It also doesn't automatically update. Help!
 
Age is really dynamic and should be calculated every time you need it. It therefore should not be a field in a table but a calculation in a query.
 
I have setup this query but I want the value to show up in my table. Can I do this?
 
If you always use a query to view the table, why do you need the value in the table?
 
I have the query setup as a field in my table. I would like a user to enter a child's name and see the age so they have an idea of other classes. Do you have a better idea?
 
Couldn't that "field" just as easily be the calculation we have talked about?
 

Users who are viewing this thread

Back
Top Bottom