In depth · Maintenance
The technical debt of Access and VBA applications
An Access application ages quietly. It keeps working, until the day an Office update, a new PC or its author's departure brings it to a halt. That accumulated fragility has a name: technical debt.

The term comes from software development: every shortcut taken to deliver faster (a hard-coded path, a copied-and-pasted query, a missing error check) is a loan. As long as nothing changes around the application, nothing is repaid. The day the environment moves, all the interest falls due at once.
Access applications are particularly exposed. They often start life as a stopgap, built by a power user rather than a development team, and then become indispensable. They go on to live through several Office versions, several generations of PCs and several successive maintainers.
The five most common forms of debt
In the Access applications we analyse, debt almost always takes the same forms. Some already cause failures; others are waiting their turn.
Part of that debt already shows in Access's own messages: Access and VBA errors, code by code, with their causes and fixes.
| Form of debt | What you see | What triggers it |
|---|---|---|
| Code written for 32-bit | "Declare" statements without "PtrSafe", "Long" types for memory addresses | Installing 64-bit Office, now the default |
| Hard-coded paths | "\\SRV01\Accounts\data.mdb", "C:\Export\" in the code or linked tables | A new server, drive letter or PC |
| Queries built by pasting | User input inserted between quotes in SQL | A name like "O'Brien" or "D'Almeida" |
| Fragile references and libraries | Old ActiveX controls, "MISSING" references, VBScript.RegExp | A new PC, Windows components being removed |
| Abandoned objects | Orphan forms, queries never called, code commented "still used?" | Any change: nobody dares delete anything |
Why it stays invisible for so long
The technical debt of an Access application does not show in daily use: users always take the same paths, which work. The broken forms are the ones nobody opens any more, rare errors get worked around ("when it crashes, we close it and open it again"). And nobody reads the VBA code.
Three events bring it suddenly to light:
- A new PC or Office version. The move to 64-bit, the disappearance of an ActiveX control or a reference is enough to stop the application opening. Our guide 64-bit Office and Access covers this case in detail.
- The author leaving. What they used to fix from memory becomes a mystery, and every change becomes risky.
- A migration project. The estimate is based on what can be seen; the debt is discovered afterwards, line by line.
Measure rather than guess
Debt is measured object by object. Reading the code is not enough: many flaws only show up when the application runs. A useful measurement combines two approaches:
- Read the application: an inventory of every object, an analysis of the VBA code (declarations, built-up queries, paths, references), and a list of objects nothing calls.
- Run it: open every form, run every query, print every report and click every button on a copy, recording the exact errors Access returns.
- Cross-check the two: a flaw read in the code and confirmed at run time is a certainty; a flaw read but never triggered remains to be verified.

Pay it back in the right order
Fixing everything makes no sense, especially if a migration is on the cards: a form that will not be carried over does not deserve repairing. The order that works in practice:
- First, what breaks everyday use: failures on forms in use, 64-bit incompatibilities, dependencies on paths that are about to disappear.
- Next, what exposes you: plain-text passwords, queries built by pasting, unprotected personal data. See our guide Securing an Access application.
- Then the quick wins: removing dead code and orphan objects lightens the application and any future project.
- Finally, what will go away: if a migration is decided, there is no point reworking what will be rewritten.
- 1
- complete inventory, before any decision
- 4
- kinds of object to run on a copy: forms, queries, reports, buttons
- 0
- rows of your table data needed to measure the debt
Preventing debt in future
A few habits limit how much builds up: keep paths in a settings table, protect every value pasted into SQL (or use parameterised queries), keep a versioned reference copy, document each fix next to the code, and delete rather than comment out what is no longer used.
To measure the actual errors in your application rather than guess them, see taking over an inherited Access database.