Re: Calculating age, given DOB & current date
- From: Paul Hyett <pah@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 22 Feb 2006 18:21:24 +0000
In microsoft.public.access.forms on Sun, 19 Feb 2006, Paul Hyett wrote :
DateDiff("yyyy", [DOB], Date()) - _
IIf(Format(Date(), "mmdd") < Format([DOB], "mmdd"), 1, 0)
Your options are to create a query, and add the Age calculation as a
computed field in the query, or use it as the Control Source for a text box
on your form.
I don't know how to do the latter, so I'll experiment with the former.
Yes, that was just want I wanted - thanks again.
--
Paul 'Charts Fan' Hyett
.
- References:
- Calculating age, given DOB & current date
- From: Paul Hyett
- Re: Calculating age, given DOB & current date
- From: Douglas J. Steele
- Re: Calculating age, given DOB & current date
- From: Paul Hyett
- Calculating age, given DOB & current date
- Prev by Date: Re: Use ADO recordset As Recordsource
- Next by Date: RE: Cannot get code to work for API Save Dialog Box
- Previous by thread: Re: Calculating age, given DOB & current date
- Next by thread: Problem with Code - On Not In List Event
- Index(es):
Relevant Pages
|