Return Query Values by Month

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a datesent field with a range of dates. I want to be able to
calculate result totals by month without seeing all the detail. Can Access
decipher all dates within January to equal January and give a one line total?
 
You can create a Calculated Field:

MYSent: Format([DateSent], "mmmm/yyyy")

in your Total Query and Group By this calculated Field.
 
I have a datesent field with a range of dates. I want to be able to
calculate result totals by month without seeing all the detail. Can Access
decipher all dates within January to equal January and give a one line total?

SELECT Format([DateField],"mm/yyyy") AS TheMonth,
Sum(YourTable.ANumber) AS Amount
FROM YourTable
WHERE (((Year([DateField]))=2005))
GROUP BY Format([DateField],"mm/yyyy");

If you would like to be prompted for the year change the above
criteria to:
WHERE (((Year([DateField]))=[What 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

Back
Top