Age Grouping

G

Guest

I would like count the number of clients in my table that fall into the
following age groups in my query or report. 62 and over, 51-61, 31-50,
18-30, 13-17, 6-12, 1-5, Under 1. I currently run 8 queries with the count
feature using Age Criteria changing each time and based off of the Birthdates
statement Age:((DateDiff(“dâ€,[Birthdate],Now())\365.25))). Any ideas on how
this can be done in one query? --

Rose
 
G

Guest

I would create an Age Range lookup table:
RangeID
RangeName
RangeLow
RangeHigh

Then, add the RangeID field to the clients table. After the age is
computed, then use it to compare againt the RangeLow and RangeHigh, to write
the RangeID into Client.

Update Client set Client.RangeID = AgeRange.RangeID...
....where ClientAge Between RangeLow and RangeHigh

Finally, calc the Counts using the Client.RangeIDs.
 

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