On Mon, 03 Apr 2006 13:05:31 GMT, tkq wrote:
I have a normal table with customer information
I have a DoB field and I want to have an automatic calculation that will show
the age of the customer in another field next to it called Age
Could you please help me with this
Thanx all
In a query:
Age: DateDiff("yyyy", [DOB], Date()) - IIF(Format([DOB], "mmdd") >
Format(Date(), "mmdd"), 1, 0)
Directly as the control source of an unbound control:
=DateDiff("yyyy",[DOB],Date())-IIf(Format([DOB],"mmdd")>Format(Date(),
"mmdd"),1,0)
You do know, I hope, that this Age computation should NOT be stored in
any table.
Just compute it and display it on a form or report, as needed.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail