Using MS Access/How to create and update balance in field on form and table
I have a table called LOANGRANTED, with the following fields; LOANID, CustomerName, TotalAmountDue, Payment, PaymentDate and Balance. I created a Querry called LOANPAYMENTS to deduce the balance. It is in this format;
But I realized this is not sufficient for my database. Assuming someone owes $1500 and pays $200, the balance according my Querry would be $1300 and that ends it! no room for an updated Balance.
I want a formulae or a VBA code which would reduce or update the Balance or TotalAmountDue whenever a payment is made by a specific client. A report should also be generated which would indicate; CustomerName, LOANID, PaymentDate, Payment and Balance.
You need two
tables. One to store information about the loan in general, and a second table to store payments:
LoanT: LoanID, InitialBalance, CustomerInfo, etc.
1, 1000, Joe
2, 500, Bill
3, 2000, Sue
PaymentT: PaymentID, LoanID, Amount, PaymentDate, etc.
1, 1, 50, 1/1/13
2, 1, 25, 1/2/13
3, 1, 10, 1/3/13
This shows that you have 3 loans. Joe has made 3 payments on his loan in the amounts of 50, 25, and 10. Now you can use an aggregate query
(or a form footer
total, or DSUM
) to total up those amounts and display it with the loan info.
I cover this kind of stuff in my Access Expert
Be sure to visit my web site and watch my FREE
2-hour-long Microsoft Access Video Tutorial
599CD Computer Training