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

Running Sum or equiv, to solve this ?

Status
Not open for further replies.

max

Programmer
Nov 23, 1998
5
US
I read most of the previous post on this issue, but i wasn't succesful to go anywhere, but here is my probelm,
i have a subform that i want to calculate 2 columns in addition to add the subtotal of the previous day to the Total. eg: i made the subtotal to work but i'm having problem with the total column

Received Sold SubTotal Total
3 2 1 1
5 6 -1 0
5 2 3 3

any help to do that,

here is the file if anyone wants to take a glance

Thanx alot in advance

thanx again
 
DSum(&quot;YourFieldToSum&quot;,&quot;YourTable&quot;, &quot;YourTblDateField < #&quot; & Format([YourQryDateField],&quot;mm/dd/yyyy&quot;) & &quot;#&quot;)
will give you the 'running sum' up to the previous date.
However, keep in mind it is calculated for each record, so the more records you have, the slower it will run.

Regards,

Dan
[pipe]
 
Thanx Dan,

but according to what you told me, that means i have to create a query table, because currently i 'm not using one,

another question , in the expresion you wrote, &quot;yourTable&quot; is that the name of the subform or the original Table, ?

thanx again,

sorry i'm not too expert in access ,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top