Age Grouping

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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.
 
Back
Top