Age > 61

  • Thread starter Thread starter rleblanc
  • Start date Start date
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!
 
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
 
Back
Top