Hi all learned people
I am trying to create a report that lists members of an organisation grouped by their current age, i.e. under 20, 25 - 29, 30 - 34 etc and provides a subtotal for each age group.
I have read inumerable posts and FAQ's in both the Queries and Reports forums but can't find any matches with my problem.
I have wrestled and repeatedly failed with nested IIf statements in the underlying query. I have also tried using different columns in the query each with an IIf statement selecting a specific age group, but then can't find a way to select the correct column for the report.
A sample IIf statement showing my separate expresion for an age group is as below:
Any pointers to a way of achieving this?
All contributions gratefully acknowledged in advance.
I am trying to create a report that lists members of an organisation grouped by their current age, i.e. under 20, 25 - 29, 30 - 34 etc and provides a subtotal for each age group.
I have read inumerable posts and FAQ's in both the Queries and Reports forums but can't find any matches with my problem.
I have wrestled and repeatedly failed with nested IIf statements in the underlying query. I have also tried using different columns in the query each with an IIf statement selecting a specific age group, but then can't find a way to select the correct column for the report.
A sample IIf statement showing my separate expresion for an age group is as below:
Code:
AgeGroup2: IIf(Int((Now()-[DOB])/365.25)>19 And Int((Now()-[DOB])/365.25)<25,"Under 25","")
Any pointers to a way of achieving this?
All contributions gratefully acknowledged in advance.