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!

summing up for five different date fields?

Status
Not open for further replies.

MaddiMond

Technical User
Mar 28, 2005
76
0
0
US
I have five date fields and am supposed to create a report summing up the dollar amount for records that have a signed date (date1) in January, next to it should be the sum of the dollar amound in January for for records that have a paid date in January(date2), etc. until December for all five dates. Rows = months, columns = date1 until date5

I had no problem with one date field and adding up the dollar amount for one month. But how can I do this for five dates in one?

I do not know if my concern is clear enough.

Thanks, Maddi
 
Here is a thought for a query that you could base your report on:
[tt]SELECT Month.MnthNo, Sum(IIf(Month([date1])=[mnthno],[amount],0)) AS D1, Sum(IIf(Month([date2])=[mnthno],[amount],0)) AS D2, Sum(IIf(Month([date3])=[mnthno],[amount],0)) AS D3, Sum(IIf(Month([date4])=[mnthno],[amount],0)) AS D4, Sum(IIf(Month([date5])=[mnthno],[amount],0)) AS D5
FROM tblDates, [Month]
GROUP BY Month.MnthNo;[/tt]

I think you might get some answers in:
Microsoft: Access Queries and JET SQL Forum
forum701
as well as this forum.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top