Calculating a running balance

How do you calculate a running balance in MS ACCESS Form i.e  if I want to creat a running balance for customer's daily purchase on credit.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

if you have the customer account table with e.g. a record for each purchase/transaction:

Table: CustTrans
Fields: CustID, Transdate, TransAmmnt

And then you have another table which sums up the first:

Table: DailyBalance
Fields: CustID, BallDate, BallAmnt

Then you can run a query every day (e.g. at midnight):

INSERT INTO DailyBalance ( CustID, BallAmnt, Balldate )
SELECT CustTrans.CustID, Sum(CustTrans.TransAmnt) AS SumOfTransAmnt, Date() AS CurrDate
FROM CustTrans
WHERE (((CustTrans.Transdate)<Date()))
GROUP BY CustTrans.CustID;

Of course this is just a synopsis, - in the real world you must code the errorhandlers, think about exceptions, probably adapt the query so it can be run at any date (not just current). But it'll get you by for starters, - notice that it gets the Customer list from the trans-table: this means than any client who has made a transaction will be included automatically, - i.e. you don't have to add new clients to the DailyBallance table.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: svenkarlsen {http:#9704559}

Please leave any comments here within the next seven days.

EE Cleanup Volunteer
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.