Others

Calculate Loan Balances and Deduct Payments in Microsoft Access

John WilsonJohn Wilson Nov 22, 2026 868 views

Question details

Calculate each loan's remaining principal from its original amount and recorded principal payments without storing a changing balance.

Calculate Loan Balances and Deduct Payments in Microsoft Access
Product
Microsoft Access
Device & OS
not provided
Scenario
A loan database has a loans table and a separate payments table, with payments linked to loans by LoanID.
Observed behavior
The desired balance updates when payment records are added or changed, without duplicating the balance in a table.
Before you start

Check that tblLoans has a unique LoanID and an OrigLoanAmt field, and that tblPayments has LoanID and PrincipalPmt fields. Use the principal portion of each payment, not any interest or fees, and adjust the names in the queries if your fields differ.

Solution 1Recommended

Calculate the balance with two Access queries

Use a payment totals query and a balance query to calculate the remaining principal for every loan, including loans with no payments.

This calculation subtracts all recorded principal payments from the original amount. It does not calculate interest, fees, or a balance as of a specific date.

1
Create the payment totals query

In Access, select Create > Query Design, switch to SQL View, and enter: SELECT LoanID, Sum(PrincipalPmt) AS PmtTotal FROM tblPayments GROUP BY LoanID;

2
Save the totals query

Select Save and name the query qryPayments. Run it to check that each LoanID has the expected principal payment total.

3
Create the balance query

Select Create > Query Design and switch to SQL View. Enter: SELECT tblLoans.LoanID, tblLoans.OrigLoanAmt, Nz(qryPayments.PmtTotal, 0) AS TotalPaid, tblLoans.OrigLoanAmt - Nz(qryPayments.PmtTotal, 0) AS Balance FROM tblLoans LEFT JOIN qryPayments ON tblLoans.LoanID = qryPayments.LoanID;

4
Run and check the results

Save the query, then select Run. Add a principal payment to tblPayments and rerun the balance query to verify that the balance decreases.

Calculate the balance with two Access queries
Loans without payments: The LEFT JOIN keeps loans that have no matching payment records, and Nz treats their missing payment total as zero.
Free Microsoft Office alternative

Review exported loan data in WPS Spreadsheets

WPS Office is a free, lightweight alternative with a familiar interface and Microsoft Office format compatibility. Export loan data from Access to Excel to review it in WPS Spreadsheets; WPS does not run Access database queries.

Review exported loan amounts and payments in a spreadsheetOpen and edit Microsoft Excel XLSX filesUse a familiar spreadsheet interface for an easier transitionWork with a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why isn't a loan with no payments showing in my query?

An INNER JOIN excludes loans without matching payments. Use a LEFT JOIN from tblLoans to qryPayments and Nz(qryPayments.PmtTotal, 0) to show a zero payment total.

Should I subtract the entire payment from the loan amount?

Only subtract the principal portion when calculating remaining principal. Record interest and fees separately so they are not included in PrincipalPmt.

Does the balance update when I add a payment?

Yes. Add the payment to tblPayments with the correct LoanID, then rerun the balance query to see the recalculated result.

Can I use this query to calculate interest?

No. The query subtracts recorded principal payments from the original amount. Interest requires additional fields and calculation rules.