How to have a running total balance in my table? (1 Viewer)

Lkwdmntr

Registered User.
Local time
Today, 12:36
Joined
Jul 10, 2019
Messages
277
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.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 19:36
Joined
Feb 19, 2013
Messages
16,553
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.
 

vba_php

Forum Troll
Local time
Today, 14:36
Joined
Oct 6, 2019
Messages
2,884
LKW,

I have these 4 illustrations on my website. One of them is actually titled "display running balance in form records"....
 

Attachments

  • multiple_ways_to_show_running_balances.zip
    553.8 KB · Views: 426

Lkwdmntr

Registered User.
Local time
Today, 12:36
Joined
Jul 10, 2019
Messages
277
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

Top Bottom