How to have a running total balance in my table?

Lkwdmntr

Registered User.
Local time
Yesterday, 23:30
Joined
Jul 10, 2019
Messages
311
Hello,

I have an "amount" field and a "balance" field in my table. I created a form to add transactions. I would like the form to have the previous balance show when a new record starts and change according to the amount entered (amount + balance)

I'm sure there is an easy solution for this, but I'm a little baffled.
 
there is a solution, but you don't do it in tables (per your header) - with a few exceptions around legal requirements, calculated values should not be stored in tables - you use a query.

with regards your form, not enough info provided and depends on what it looks like and how it is intended to work. You might use a dsum function or you might use a query

the dsum function would look something like this as a controlsource to a form control

=dsum("amount","myTable","criteria here")

either way as a minimum your records need to be timestamped or have some other basis of uniquely identifying an order - date on its own is insufficient if you have more than one transaction in a day.
 
Thanks, I used the dSum and it worked great. I have another issue, but I'm going to post it as a new thread. Thanks
 

Users who are viewing this thread

Back
Top Bottom