Skip to content
Auscultby NBIT
EN
Free diagnostic

Access error reference

Access error 2950: macro action failed

A button does nothing, then Access shows a macro failure box with error number 2950. That number only says a macro action failed: the real cause is elsewhere in the box, or in what Access said just before.

The message

Access shows a box naming the macro (often an embedded macro: “Button : On Click”), the failed action, its arguments and error number 2950. Under that number, the message Access returns to code that automates it carries the wrapped error, for example:

2950 Microsoft Access cannot find the referenced form '…'. — Macro name: …

translated from a real French record; the English wording of the wrapped error is Access's

Other records under the same number: “Syntax error (missing operator) in query expression …”, “Data type mismatch in criteria expression”, or nothing but the macro name.

Where it shows up

In macros, including macros embedded in buttons and form events: OpenForm, RunCode, SetValue, ApplyFilter, and so on.

Common causes

  • the database is not trusted: opened outside a trusted location with content disabled, Access blocks actions it considers unsafe;
  • a renamed or deleted object the action refers to (form, report, query);
  • a VBA function called by RunCode that no longer exists, or a module that does not compile;
  • a bad argument: malformed criteria, wrong data type.

How to reproduce and check it

  1. Read the whole box: the action name and its arguments say what was requested.
  2. Check Access's message bar (“Some active content has been disabled”) and the Trust Center: is the database in a trusted location?
  3. Open the macro in Design view and run it with Single Step (Design tab).

How to fix it

Trust the database's folder (File > Options > Trust Center > Trusted Locations) rather than lowering security for the whole PC. Then fix the object or function the action refers to, just as you would the wrapped error itself.

What Auscult reports

The diagnostic does not judge 2950 by its number: it judges the error it wraps. “Cannot find the referenced form” is handled as a missing form, “missing operator” as a syntax error, and so on, with the macro and the button involved. When Access says nothing but the macro name, the item is marked “to check” rather than “broken”.

The Access error reference, code by code

Frequently asked questions

Should I lower macro security to get rid of it?

No. Trust only the folder that holds the application. Lowering security for the whole PC exposes every other database.

Where are the other errors in your application hiding?

The diagnostic runs on your computer, on a copy of the application, without sending the data in your tables. The health grade and the summary are free.