Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple Math

Status
Not open for further replies.

esu4edp

Technical User
Feb 15, 2000
59
0
0
US
I've tried using expression, code and macro, but I'm doing something wrong. I have a form that you enter payments on. Customer has a starting balance. Customer makes a payment. I want to subtract the payment amount from the starting balance to come up with a current balance. And each time they make a payment, the current balance will change depending upon the payment amount.
 
hi,
two ways of doing this, One is to enter the amount the Costomer pays in a negative amount -10.00, you can do this in the Afterupdate event of the field by using (txtTextbox)* -1
Or use a debit field and a credit field and have the Balance due field calaculated the balance.

Duf
 
An alternative way would be to have a seperate table for payments and an initial table that holds customer name and debt. have a form show the customer and debt then a subform with all the payments made. now a simple calculation to sum all the payments and subtract the total from the debt.

Be ALERT - Your country needs Lerts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top