How do you sum based on calendar year that has multiple years?

R

Rick

I have a DB that has dates that I want to sum up by year. I was trying to
use the IIf and DSum command together. Is there another way or how do you
imbed the DSum function in the IIf function?
 
A

Allen Browne

Use a totals query.

In query design, depress the Total button on the toolbar.
Access adds a Total row to the query design grid.

In the Field row, enter:
TheYear: Year([d])
substituting your field name for [d].
In the Total row under this field, accept Group By.

You can now sum the other field to get a total for each calendar year.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top