SELECT Year([Date Field]) as TheYear,
Sum([Field1]) AS SumField1,
Sum([Field2]) AS SumField2
FROM YourTable
GROUP BY Year([Date Field])
ORDER BY Year([Date Field]) ;
Or in the query design view, surround the date field with:
Year([TheDateField])
Make sure that you go up to View and select Totals. Group By should be under
the date field.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
sierralightfoot said:
In design view in an access query:
I have a date field. I want to group the returns based on based on the year.
Can I do this is the total row?