this formula calculates age from date of birth (another field). It works
fine. I am open to any alternatives, but I would like to have age value
somehow to be transfered from form (calculated field) to table. I will later
run queries and I will need this value.
Thanks
> First problem is that you are wanting to put a calculated value in a table.
> There is almost never a reason to do that. Why taking the processing time
[quoted text clipped - 11 lines]
> > in the form, and then also displayed in source table (age column). Please
> > help me to adjust this formula. Thanks
All you need to calculate age is:
=DateDiff("yyyy",[DOB],Date)
It is the other part I don't really get:
+Not (Format(Date(),"y")>=Format([DOB],"y"))
You don't need it.
You do not need to store the age in a table. Any experienced database
developer and anything you read on database design will tell you not to store
calculated values.
Even for running a query, you don't need it. You can include the
calculation in the query, for example, If you want to get the age for a
person and you have the [DOB] field, then in the field row of the column in
the query builder where you want the age:
Age: DateDiff("yyyy",[DOB],Date)
Simple as that.
> this formula calculates age from date of birth (another field). It works
> fine. I am open to any alternatives, but I would like to have age value
[quoted text clipped - 17 lines]
> > > in the form, and then also displayed in source table (age column). Please
> > > help me to adjust this formula. Thanks
alexasha - 18 Aug 2005 14:12 GMT
=DateDiff("yyyy",[DOB],Date)
this formula does not work. I will stay with my old formula, that I found on
this forum, because it works. Thanks for your help.
> All you need to calculate age is:
> =DateDiff("yyyy",[DOB],Date)
[quoted text clipped - 36 lines]
> > > > in the form, and then also displayed in source table (age column). Please
> > > > help me to adjust this formula. Thanks
Klatuu - 18 Aug 2005 14:50 GMT
The formula does work.
> =DateDiff("yyyy",[DOB],Date)
> this formula does not work. I will stay with my old formula, that I found on
[quoted text clipped - 40 lines]
> > > > > in the form, and then also displayed in source table (age column). Please
> > > > > help me to adjust this formula. Thanks
Rick Brandt - 18 Aug 2005 15:07 GMT
> The formula does work.
The formula DateDiff("yyyy",[DOB],Date) Will be wrong for all the days of
the current year before the persons birthday. For example; if the DOB is
12/31/2004 it will indicate that they are one year old on 1/1/2005. You
need to add an additional expression that takes this into account.

Signature
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com