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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running Totals in a Query

Status
Not open for further replies.

SteveQL

Programmer
Jul 6, 2001
15
US
Hi All,
I need to see running totals in the output of a query. Something like this:

Item # Week Gross Ship Qty Rolling Gross Ship Qty
100 200401 100 100
100 200402 50 150
100 200403 100 250
101 200401 75 75
101 200402 10 85
101 200403 100 185


The data is is contained in one table. I tried to use the DSUM function, but did not get the resul;ts I expected.... there is the expression I used:
Rolling Gross Ship Qty: DSum[Gross Ship Qty],"TableName")

Is DSUM the appropriate function? What am I doing wrong??

Thanks for your help!

Cheers!
Steve
 
SteveQL,

Take a look at faq701-5268 - it might get you started in the right direction.

Ken S.
 
Eupher,
That's exactly the kind of thing I was looking for... thanks!
 
Try this:
Rolling Gross Ship Qty: DSum([Gross Ship Qty],"TableName","[Item #]=" & [Item #] & " AND [Week]<=" & [Week])

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top