calculations

G

Guest

I am still trying to work out the bugs of my database, but I am having one
more problem. I have a subform called, Ledger, and it is just that a ledger.
The problem is that I am trying to have it calculate a balanced owed after a
payment has been made. I have date, type of payment, original balance,
amount owed, check number, and amount paid in the subform. Under the amount
owed column I have made a calculation to subtract the payment from the
original balance. However, after the second payment it still shows the same
outstanding balance. Example: 63.44 11/15/04 Check 10.00
53.44
63.44 11/17/04 Visa 10.00 53.44
I have tried several diferent types of calculations but then I get a
circular error.
Do I need to go to a spread sheet application or is there some other way
around this.
 
W

Wayne Morgan

A "circular error" is usually caused by the control and field it is bound to
having the same name or by trying to reference the calculated control in
it's own calculation.

The balance won't update until the new entry has been saved to the table. It
may be easiest to do this calculation in the query feeding the subform by
using a calculated field in the query then bind the balance textbox to this
field.

Example:
SELECT Table2.Payment, Table2.PmtDate, [OrigBal] -
DSum("[Payment]","[Table2]","[Field2]<=#" & [PmtDate] & "#") AS Balance
FROM Table2;
 

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