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

Calculated balance field for each row 1

Status
Not open for further replies.

jckokko

Programmer
Jun 4, 2001
31
US
I have a table that resembles a bank transaction: transId, check#, pay-to, currentAmount, pay-date, etc.
I have a report out of that table with one more field in it: balance. I want the balance field to be calculated as " = previousBalance - currentAmount". I don't know how to do it.

I thought about adding the "Balance" field to the table.
First of all, I think it's not good idea to reserve a space to hold calculatable data.
If I have to use the "Balance" field, still, how would I calculate the balance?

 
If the running sum is increaseing rather than decreasing, then make the column -[YourField] and use the running sum.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
"Running Sum" works, but how can I start the balance with value $1000.00? So, instead of the first row starting with -$5.00, the first row balance would be $1000 - $5 = $995. And the second row balance would be $995 - currentAmount.
 
Assume a field or expression in your report's record source of
BegBal:1000
Add another text box and set its control source to add [BegBal] and your running sum text box.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top