Running Total problem..

Manos39

Registered User.
Local time
Today, 14:26
Joined
Feb 14, 2011
Messages
248
I need to calcculate the running total of [ΔΙΑΦΟΡΑ ΣΕ ΩΡΕΣ] in a new field my query :

SELECT QrSynolaT.ΕΠΩΝΥΜΟID, DatePart("yyyy",([ΑΝΑ ΜΗΝΑ])) AS ΕΤΟΣ, DatePart("m",([ΑΝΑ ΜΗΝΑ])) AS ΜΗΝΑΣ, Sum(QrSynolaT.[ΔΙΑΦΟΡΑ ΣΕ ΩΡΕΣ]) AS ΩΡΕΣ
FROM QrSynolaT
GROUP BY QrSynolaT.ΕΠΩΝΥΜΟID, DatePart("yyyy",([ΑΝΑ ΜΗΝΑ])), DatePart("m",([ΑΝΑ ΜΗΝΑ]))
ORDER BY DatePart("yyyy",([ΑΝΑ ΜΗΝΑ])), DatePart("m",([ΑΝΑ ΜΗΝΑ]));

according to an example expression i found:
[ Field: RunTot: DSum("Freight","Orders","DatePart('m', _
[OrderDate])<=" & [AMonth] & " And DatePart('yyyy', _
[OrderDate])<=" & [AYear] & "")
Total: Expression
Show: Yes ]


I try to calcculate the running total with the expression Dsum but didnt managed.. can anyone help me?
 
Look at "DemoRuningTotalA2000.mdb" (attachment, zip).
Look at Table1, queries, Form1, Module1, Report1, (column "Group Total", RUNING SUM properties).
Open Form and try.
 

Attachments

Thank you MStef, i used the module in the db you sent me, yes it is useful but there is a problem. When used the module supposes it has to sum every previus value, but in my case the value i want to sum is total hours of week per empoyee, soo it sums every employee's values as if it was theirs individually. See?
 
Thank you MStef i used the module in my query but because in my query the employees are not one, it sums everyones total hours by the previus value...
It is a big problem for me. Thank you though!!
 

Users who are viewing this thread

Back
Top Bottom