group records by month

J

Josh Henry

hi, in my main table, [Journal], each record has a date (mm/dd/yy). In my
query I want to pull all the records of a single month and group those
records together. Meaning, when i query for rent, i want it to total all
january together and show 650 or whatever, rather than several records in
january totaling 650. thanks for any help
 
J

John Spencer (MVP)

Use a totals query and use a calculated value based on the datefield to group by
or select your records.

A simple sample SQL statement might look like:


SELECT Sum(Rent) as TotalRent
FROM Journal
WHERE Format(DateField,"YYYYMM") = "200409"
 
Top