Running Balance

K

Kevin

I am developing a account ledger database - I have an
account table and transaction table linked by accountID.
I want to develop a form with a running total deposits +
withdrawls(record by record). You can do this in excel -
how do i do it in access?
 
M

Michel Walsh

Hi,

SELECT a.AccountID, a.DateTime, SUM(b.Deposit)-SUM(b.Withdrawal) As
running
FROM myTable AS a INNER JOIN myTable As b
ON a.AccountID=b.AccountID AND a.dateTime >= b.dateTime
GROUP BY a.AccountID, a.DateTime



Hoping it may help,
Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top