Running totals

Badvoc

Registered User.
Local time
Today, 19:18
Joined
Apr 22, 2009
Messages
69
Im using the method described in Article ID: 290136 (http://support.microsoft.com/kb/290136) to create a running total in a query, this is work great until the years changes in the data and it starts over again.
How can I rewrite this code so it will give a running total over 2 or more years

Code:
SELECT qryM_DaysRqdCntSystem10.AYear, qryM_DaysRqdCntSystem10.AMonth, DSum("Required","qryM_DaysRqdCntsystem10","datepart('m',[TR raised])<=" & [Amonth] & " And Datepart('yyyy',[TR raised])<=" & [AYear] & "") AS Runtot, qryM_DaysRqdCntSystem10.Team, Format([tr raised],"mmm") AS amonth1
FROM qryM_DaysRqdCntSystem10
GROUP BY qryM_DaysRqdCntSystem10.AYear, qryM_DaysRqdCntSystem10.AMonth, qryM_DaysRqdCntSystem10.Team, Format([tr raised],"mmm")
ORDER BY qryM_DaysRqdCntSystem10.AYear, qryM_DaysRqdCntSystem10.AMonth, Format([tr raised],"mmm");

thanks
 

Users who are viewing this thread

Back
Top Bottom