age calculator to display months as well as years

  • Thread starter Thread starter Karen
  • Start date Start date
K

Karen

I want Access (97) to calculate somebody's age. I know you
can do that by setting the Control Source property of a
textbox to

=DateDiff("yyyy",[Date],Date())+(Format([Date],"mmdd")
Format(Date(),"mmdd"))

but that will "just" display the person's age in years
whereas I'm looking for months as well.

Anybody has an idea how to do this without including a
macro?

Karen
 
Do a search. This was answered within the last three weeks or so. I
remember seeing it posted.

Rick B


I want Access (97) to calculate somebody's age. I know you
can do that by setting the Control Source property of a
textbox to

=DateDiff("yyyy",[Date],Date())+(Format([Date],"mmdd")
Format(Date(),"mmdd"))

but that will "just" display the person's age in years
whereas I'm looking for months as well.

Anybody has an idea how to do this without including a
macro?

Karen
 
I want Access (97) to calculate somebody's age. I know you
can do that by setting the Control Source property of a
textbox to

=DateDiff("yyyy",[Date],Date())+(Format([Date],"mmdd")
Format(Date(),"mmdd"))

but that will "just" display the person's age in years
whereas I'm looking for months as well.

Anybody has an idea how to do this without including a
macro?

Karen

You'll need code!

See Doug Steele's code at:
http://members.rogers.com/douglas.j.steele/Diff2Dates.html
 
In addition to the fine code on Doug's site, there's also this:
http://www.pacificdb.com.au/MVP/Code/Age2.htm

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

Microsoft Access 2003 VBA Programmer's Reference
http://www.wiley.com/WileyCDA/WileyTitle/productCd-0764559036.html


fredg said:
I want Access (97) to calculate somebody's age. I know you
can do that by setting the Control Source property of a
textbox to

=DateDiff("yyyy",[Date],Date())+(Format([Date],"mmdd")
Format(Date(),"mmdd"))

but that will "just" display the person's age in years
whereas I'm looking for months as well.

Anybody has an idea how to do this without including a
macro?

Karen

You'll need code!

See Doug Steele's code at:
http://members.rogers.com/douglas.j.steele/Diff2Dates.html
 
Back
Top