Hi,
SELECT a.Item, a.dateTime, SUM( b.LateFee - b.payment ) As balance
FROM myTable As a INNER JOIN myTable As b
ON ( a.item=b.item) AND ( a.dateTime >=b.dateTime)
GROUP BY a.item, a.dateTime
Note that the first LateFee of an item (first in relation to its date_time)
should be the "initial balance" ( the initially contracted debt, as
example).
You can add an ORDER BY clause if you want to be sure about the
"presentation" of the result, but the order by is not, here, required to
compute the results.
Hoping it may help,
Vanderghast, Access MVP
griffde said:
I am having trouble with calculating a expression in a form. I can get a
New Balance by putting in formula, to take Previous Balance - Paymentamount
+ Late fee's . But how Do I get it to use that new Balance next time a
payment is made?