Age Groups

Dazzla

Registered User.
Local time
Today, 14:11
Joined
Nov 5, 2004
Messages
23
I have a patient form that has the patients age on it. i now want to count the number patients in different age groups by gender. Say 25-35, 26-45 etc. and put this into a report.

Is this possible to do in a query or report
 
Yes your query will group by gender and have a series of calculated filds such as age20-29: Sum(IIf([fldage]>19 And [fldage]<30,1,0)) with expression in the total line of the grid

Brian
 
Pat Hartman said:
Look up the Partition() function. As long as your groups are equal size, it will do the work for you. No need for a nasty IIf().
QUOTE]

Since when did management make life that easy, they always want those over a certain age lumped together :mad:
What's nasty about the IIf() a lovely flexible little function :rolleyes:

The presentation of the output from the 2 approaches is also quite different, as I want to group by gender usually within another grouping I find the IIf output easier to handle.

Brian
 
Thanks for the help, all is working fine now.
 

Users who are viewing this thread

Back
Top Bottom