I'm doing a query which filters records of people that are aged 18 - 25. This works fine but I want to to a query which will retun a range of ages as opposed to just one age bracket.
When I run this query it will only return the ages of people ages 18 - 25. I want it to also return ages 26 -35, 36 - 45 etc
I'm having trouble getting this work. Here is the current sql query
When I run this query it will only return the ages of people ages 18 - 25. I want it to also return ages 26 -35, 36 - 45 etc
I'm having trouble getting this work. Here is the current sql query
Code:
SELECT tblMain.ID, Count(tblMain.CustDOB) AS CountOfCustDOB
FROM tblMain
GROUP BY tblMain.Venue, DateDiff("yyyy",[CustDOB],Now())
HAVING (((DateDiff("yyyy",[CustDOB],Now()))>=18 And (DateDiff("yyyy",[CustDOB],Now()))<=25));