Running Totals by date misbehaving
I applied to the letter the sample code given
on http://support.microsoft.com/?kbid=290136
but it seems the running total breaks when the day number
is less than the previous date
Example using one Table (Access 2000):
ES QAC
6/ 8/2005 100
6/10/2005 50
6/10/2005 200
6/15/2005 400
7/ 2/2005 20
7/14/2005 60
7/14/2005 600
8/ 3/2005 500
8/20/2005 10
Expected result :
ES QAC
6/ 8/2005 100
6/10/2005 350
6/15/2005 750
7/ 2/2005 770
7/14/2005 830
8/ 3/2005 1130
8/20/2005 1140
The Query :
First Column :
Field : AMonth : DatePart("m",[ES])
Total : Group by
Sort : Ascending
Show : Yes
Second Column :
Field : ADay : DatePart("d",[ES])
Total : Group by
Sort : Ascending
Show : Yes
Third Column :
Field : RunTot: DSum("QAC","Tes t","DatePart('d ', _
[ES])<=" & [ADay] & " And DatePart('m', _
[ES])<=" & [AMonth] & "")
Total : Expression
Show : Yes
Obtained result from the above Query :
ES QAC
6/ 8/2005 100
6/10/2005 350
6/15/2005 750
7/ 2/2005 20 <--- ???
7/14/2005 1030
8/ 3/2005 520 <--- ???
8/20/2005 1940
Can somebody tell me where I went wrong ?
Thank you for your help.
J.P.