Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NEED ONLY SPECIFIC CALCULATED AGES IN REPORT

Status
Not open for further replies.

joanl

Technical User
Apr 10, 2001
20
US
I've checked the searches for my particular dilemma, but can only find how to calculate ages. One of my fields in the table is the DOB (date of birth). My report has an unbound textbox called CurrentAge with this code in the control source:

Code:
 =IIf(Not IsNull([DOB]),Fix((Now()-[DOB])/365.25))

All the ages display just fine in the report. But in my report, I need to display people aged 18 and older. I've tried placing the [CurrentAge] >=18 parameter in the filter property on the report, but doesn't work. Would code work better? Any suggestions or help is really appreciated.
 
Hopefully your report's record source is a query. If so, add a calculated field to the query for the age and set your criteria to >=18

HTH
 
BDay18 = DateAdd("yyyy", 18, #8/21/92#)
? BDay18 < Now
MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Thanks for everyone's input. I used the query method and it works like a charm.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top