Running Totals

mbar

Registered User.
Local time
Today, 18:21
Joined
Nov 4, 2010
Messages
20
Hi-

I'm trying to create a running totals in a query and am stumped. I've read similar posts and cannot understand why this is not working for me.

I have a table named "test" with the following info:

testid (autonumber) AQty
1 30
2 85
3 108
4 556
5 400
I then tried to use the DSum function to create a running total:

RunTotal: DSum([AQty],"test","[testid]<=" & [testid] & "")

This is an exact copy of similar threads where the users report success- the only difference is my field names.

when I run the query, here's what I get for results:

testid (autonumber) AQty RunTotal
1 30 30
2 85 170
3 108 324
4 556 2224
5 400 2000

Notice that in the last record the RunTotal is less!!

I can't understand what the problem is- PLEASE help!!!

Thank you in advance
 
See if this works:

RunTotal: DSum("AQty","test","[testid]<=" & [testid])
 
pbaldy-

Thanks!!!!

That did the trick. just a small adjustment that took hours for me to work on.

thanks again
 
No problem; it wants those quotes around the field argument. The bit at the end was probably not hurting anything, but wasn't necessary.
 

Users who are viewing this thread

Back
Top Bottom