suggestions needed

AN60

Registered User.
Local time
Today, 18:59
Joined
Oct 25, 2003
Messages
283
I am still working on my rainfall db (as time allows). I have the following fields in a tbl.

1. Precipitation
2. FallDate
3. rainID

This is working ok.

I am using Mile-O-P's calendar on a form to view reports with date ranges. This will give me all rainfall between any two dates. What I now want to do is report total rainfall for each year Jan1 to dec 31 (from 1980 to present) and get the average yearly rainfall. I am open to suggestions.
 
A simple totals query should get this for you. Something like:

SELECT Sum(Precipitation) AS AnnualTotal, Year(FallDate) AS PrecipYear
FROM TableName
GROUP BY Year(FallDate)
 
Thanks Pbaldy.
I've tried your suggestion but it does not return the results I'm looking for. First I want the query to group the years separately. I've added DateYear which shows the year eg 1981, in an attempt to make the criteria easier but I haven't had any successs. So if anyone knows how to make a query group dates into separate years I'd appreciate the help.
 
Don't worry I've solved my small problem. I will no longer work on db's late at night. A simple grouping/footer in the report has done the trick. ;)
 

Users who are viewing this thread

Back
Top Bottom