Others

Calculate a Running Balance in a Microsoft Access Checkbook Register

Elise WilliamsElise Williams Nov 20, 2026 870 views

Question details

Calculate each checkbook transaction's ending balance from deposits, withdrawals, and the preceding balance in Microsoft Access.

Calculate a Running Balance in a Microsoft Access Checkbook Register
Product
Microsoft Access
Device & OS
not provided
Scenario
A checkbook register needs a running balance even when transactions share a date or are entered out of date order.
Observed behavior
The desired balance follows transaction date order, with the primary key breaking ties between transactions on the same date.
Before you start

Check the table and field names, the opening balance, and whether transaction dates contain time values. The example uses tblCheckbook with a numeric primary key named ID, a date-only field named TransactionDate, and Deposit and Withdrawal fields.

Solution 1Recommended

Use DSum with the transaction date and ID

Use this approach to calculate a running balance in a query, including transactions entered out of date order.

The expression sums deposits minus withdrawals through the current transaction. It orders same-day transactions by ID; change the field and table names if yours differ.

The example assumes TransactionDate values contain no time and are not blank. It starts the balance at zero, so add a fixed opening balance to the expression if needed.

1
Open a query in Design View

In Access, select Create > Query Design and add tblCheckbook. Add TransactionDate, ID, Deposit, and Withdrawal to the query grid.

2
Add the running balance

In a blank Field cell, enter: RunningBalance: Nz(DSum("Nz([Deposit],0)-Nz([Withdrawal],0)","tblCheckbook","[TransactionDate] < #" & Format([TransactionDate],"mm\/dd\/yyyy") & "# OR ([TransactionDate] = #" & Format([TransactionDate],"mm\/dd\/yyyy") & "# AND [ID] <= " & [ID] & ")"),0)

3
Sort and run the query

Set Sort to Ascending for TransactionDate and ID, with TransactionDate to the left of ID in the grid. Select Run and check the balances against known transactions.

Use DSum with the transaction date and ID
Opening balance and performance: To include a fixed opening balance, add it to the expression after the final parenthesis. DSum can be slow on large registers; a query using a join or another aggregate approach may be more efficient. The calculated balance itself is read-only.
Free Microsoft Office alternative

Track checkbook balances in WPS Spreadsheets

WPS Office is a free, lightweight alternative with a familiar interface and Microsoft Office format compatibility. Move an exported checkbook register into WPS Spreadsheets to calculate balances with spreadsheet formulas; it does not fix or replace the Access database query.

Calculate checkbook balances with spreadsheet formulasOpen and save Microsoft Excel XLSX files for easier migrationUse a familiar spreadsheet interfaceWork with a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why isn't sorting by ID alone reliable?

If an older transaction is entered later, it receives a higher ID and would appear after newer transactions. Sort by TransactionDate first and ID second to calculate balances in date order.

What happens when two transactions have the same date?

The expression includes same-day transactions whose ID is less than or equal to the current ID. This gives each transaction a consistent position within that date.

How do I include an opening balance?

Add the opening amount to the end of the RunningBalance expression in Query Design. Alternatively, record it as a transaction before the other entries, but don't do both.

What if my transaction dates include times?

The example assumes date-only values. If times matter, revise the criteria to compare the complete date and time, then use ID as the tie-breaker for identical timestamps.

Can I edit the running balance directly?

No. RunningBalance is calculated by the query. Edit the underlying deposits, withdrawals, or transaction dates instead; whether those fields are editable depends on the query.