logo
search
Others

How to Fix The Object Does Not Contain the Automation Object in Microsoft Access

Emma BrownEmma Brown Oct 9, 2026 870 views

Question details

The user encounters an automation object error when attempting to open a form for a many-to-many relationship using a command button.

Fix "The Object Does Not Contain the Automation Object" Error in Microsoft Access
Product
Microsoft Access
Device & OS
not provided
Scenario
Clicking a button created with the button wizard to open a specific database form.
Observed behavior
Microsoft Access fails to open the form and displays the error message: "The object does not contain the automation object."
Before you start

Before troubleshooting the button code, attempt to open the target form directly from the Navigation Pane to verify that the form itself is not corrupted or missing.

Solution 1Recommended

Verify and Compile VBA Code and Macros

Check the code generated by the button wizard for incorrect object references or missing automation libraries, which are the primary causes of this error.

When the Command Button Wizard generates a macro or VBA code, it relies on specific library references and exact form names. If a form was renamed or a library is missing, the automation object error will trigger.

1
Open the Button's Event Properties

Right-click the problematic form in the Navigation Pane and select "Design View". Click the malfunctioning button, open the Property Sheet (F4), and navigate to the "Event" tab.

2
Review the Macro or VBA Code

Click the ellipsis (...) next to "On Click". If it's a macro, verify that the "OpenForm" action points to the exact correct form name. If it's VBA, ensure the form name in the DoCmd.OpenForm statement matches your form.

3
Compile the Database Code

Press ALT + F11 to open the VBA Editor. From the top menu, click "Debug" and select "Compile Database". Access will highlight any broken references or syntax errors that need to be corrected.

4
Check Library References

While still in the VBA Editor, click "Tools" > "References". Look for any checked items that start with "MISSING:". Uncheck these boxes or browse to locate the missing files, then click "OK".

Verify and Compile VBA Code and Macros
Code Compilation: Successfully compiling your database ensures that all VBA references are valid, preventing runtime automation errors during user interactions.
Free Microsoft Office alternative

Try WPS Office for Your Daily Document, Spreadsheet, and Presentation Needs

While Microsoft Access is designed for complex relational databases, WPS Office provides a free, lightweight, and highly compatible alternative for handling all your daily word processing, spreadsheet data analysis, and presentation tasks without expensive subscriptions.

  1. 1. Download WPS Office: Visit the official WPS Office website and download the free installation package for your operating system.
  2. 2. Install and Launch: Run the installer. Once installed, open WPS Office to access Writer, Spreadsheets, Presentation, and PDF tools from one unified dashboard.
  3. 3. Work with Microsoft Formats: Open your existing Word, Excel, or PowerPoint files directly in WPS Office. All edits will save in fully compatible formats.
Fully compatible with Microsoft Office formats (.docx, .xlsx, .pptx).Familiar tabbed user interface ensures a seamless migration with zero learning curve.Lightweight installation that runs smoothly even on older devices.Includes powerful built-in tools for advanced PDF editing and file conversion.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Microsoft Access say 'The object does not contain the automation object'?

This error typically occurs when a macro or VBA code attached to a button references a missing automation library, an incorrectly named form, or an object that has been deleted or renamed in the database.

How do I fix missing library references in Microsoft Access?

Press ALT + F11 to open the VBA Editor, go to Tools > References, and look for any checked items labeled 'MISSING'. Uncheck them or browse for the correct file location to resolve the reference issue.

Can I fix a broken form button without writing VBA code?

Yes. You can switch your form to Design View, delete the malfunctioning button, and use the Command Button Wizard to draw a new one. The wizard will automatically generate a fresh, correctly configured embedded macro to open your form.