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

How do you create a Running Total in an Access Quiery

Status
Not open for further replies.

mcconnellrc

Programmer
Feb 2, 1999
1
US
Given a tabel with the following data<br>
Month Cost<br>
Jan 10<br>
Feb 15<br>
Mar 12<br>
<br>
How do you set up a querry to calculate a running sum<br>
Month Cost RunningCost<br>
Jan 10 10<br>
Feb 15 25<br>
Mar 12 37<br>

 
Easy to do in a report, by creating a recordset and calculating the running sum, or using a maketable query and doing an update. I don't think this can be done in a one off query to produce this result.
 
In a query, you can accomplish a running sum by using Dsum. The criteria in this case would be <br>
RunVol: (DSum("[Cost]","Tblename","[datefld] &lt;= " & [datefld])).<br>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top