I've managed to make a query that let me pick my quarter dates.
I couldn't use datediff cause it was giving me wrong ages when BDay was in a month prior present date.
I have used:
Code:
Age: DateDiff("yyyy";[DataNasterii];Date())+(Format([DataNasterii];"mmdd")>Format(Date();"mmdd"))
It gives me the right age so far.
Partition function looks ok for equal ranges but mine are not all equal. I don't know how to make Partition function to work for my ranges.
Searching the internet I come across a code that I've tried to replicate it with my data:
I made a table called AgeGroupsT where I defined the groups (under 25, 25-29, 30-39, 40-49, 50-55, over 55).
I made a query called NrClientiTrimestru where I get client's age from BDay from main table.
I try to make another query (AgeQ) to join data from the 2 mentioned above but I get the error:

Here is the code for AgeQ query:
Code:
SELECT AgeGroupsT.AgeLow, AgeGroupsT.AgeHigh, Count(NrClientiTrimestruQ.Varsta)FROM AgeGroupsT, NrClientiTrimestruQ
INNER JOIN NrClientiTrimestruQ
ON NrClientiTrimestruQ.Varsta Between AgeGroupsT.AgeLow And AgeGroupsT.AgeHigh
GROUP BY AgeGroupsT.AgeLow, AgeGroupsT.AgeHigh
ORDER BY AgeGroupsT.AgeLow
Anyone knows why?