Reference
Access error codes and VBA errors: a reference, code by code
Each page starts from the message exactly as Access shows it, in English and French, then gives the common causes, how to check, how to fix it, and what the Auscult diagnostic reports.
The error pages
| Code | Message (English Access) | Where it shows up |
|---|---|---|
| 3061 | Too few parameters. Expected 1. | query run from VBA |
| 3075 | Syntax error (missing operator) in query expression | criteria or SQL built in code |
| 2465 | Microsoft Access can't find the field '…' | form, report, calculated control |
| 3021 | No current record. | recordset or form with no record |
| 2950 | macro action failed | macros, embedded macros |
| 2501 | The OpenForm action was canceled. | DoCmd: open, export, print |
| — | The code in this project must be updated for use on 64-bit systems… PtrSafe | 64-bit Office, Declare statements |
| — | Can't find project or library | VBA references marked MISSING |
The French messages quoted on these pages are the ones Access really shows: they were recorded in Access while analysing the applications in our test corpus. The English messages are Access's own wording. Names specific to each application (fields, forms) are replaced by “…”.
Reading an Access error message
- the number is the same in every language: search for it when your Access is not in English;
- what is in quotes is the name involved in your application: field, form, query, expression;
- “Run-time error” comes from VBA code, “Compile error” means the code cannot even start;
- a macro failure box (number 2950) wraps another error: that is the one to read.
What the diagnostic does with these errors
Auscult opens every form, runs every report and query and clicks the safe buttons, in Access, on a copy of the application. Every error Access returns is recorded with the object that produced it, then grouped by cause: one cause, one fault. Each item gets a verdict: works, broken, fails if… (with the condition spelled out), to check, or not verified. The report never claims more than it measured.