Age > 61

R

rleblanc

I have a report in which I calculate the client's ages. That is fine. But in
the final report I only want to list clients that are 62 or older. How can I
tell the report that I want only those 62 and older. (Age is calculated from
DOB and works just fine.)

=DateDiff("yyyy", [DOB], Date()) - IIF(Format([DOB], "mmdd") >
Format(Date(), "mmdd"), 1, 0)

Thanks!
 
J

John Vinson

I have a report in which I calculate the client's ages. That is fine. But in
the final report I only want to list clients that are 62 or older. How can I
tell the report that I want only those 62 and older. (Age is calculated from
DOB and works just fine.)

=DateDiff("yyyy", [DOB], Date()) - IIF(Format([DOB], "mmdd") >
Format(Date(), "mmdd"), 1, 0)

Thanks!

Just do the calculation in a Query instead of on the form. Put this
same expression, without the = sign but preceded by Age:, in the Query
upon which you base the report. Put a criterion on this field of

and have a textbox on the report with Age as its control source.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top