Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

In any given Month 2

Status
Not open for further replies.

brendoaccess

Technical User
Mar 28, 2006
27
GB
Hi. I have a 2 field table with Donation_Amount and Donation_Date. There are thousands of records covering over 15 years. I want to be able to tell which the frequency of donations by month - regardless of the year - and can't think how.

What I want is something like

>December and <February

or

=January

in a criteria field to give me all the donations for January for all the records. Then I can sum, avg, or whatever.

Many thanks
 
Have you looked at Pivot Tables?
Or in your query, create another field using DatePart. Then run your criteria off of that. eg.
MonthPart:DatePart("m",[Yourdatefieldname])
 
You can use Month:

Select Month(Donation_Date), Sum(Donation_Amount)
From tblDonations
Where Month(Donation_Date) Between 5 And 8
Group By Month(Donation_Date)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top