How to Fix Microsoft Access Error 2467 in a VBA Print Button
Question details
The user needs to resolve Access Error 2467, which occurs when executing a VBA print button due to unavailable object references.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Clicking a custom VBA print button within an Access database to print a report or form.
- Observed behavior
- The VBA execution halts and displays Error 2467, highlighting a specific code line where the referenced form, report, or control is unavailable or closed.
Ensure you have a recent backup of your Access database before modifying any VBA code. Open the Visual Basic Editor (Alt + F11) and note the exact line of code highlighted when the error dialog appears.
Verify Object Names and States in the VBA Editor
Check that all forms, reports, and controls referenced in your print macro actually exist, are spelled correctly, and are open at runtime.
Error 2467 typically occurs because the VBA code is trying to interact with an object (like a specific form or control) that is currently closed or has been renamed. Ensuring the object is loaded in memory before the print command fires is critical.
Click your print button to trigger the error, then click 'Debug' on the error prompt to open the VBA Editor at the exact failure point.
Look at the highlighted yellow line. Identify the form, report, or control (e.g., a 'Comment' text box) being referenced.
Check your Access Navigation Pane to ensure the object exists and the spelling in your VBA code exactly matches the object's name.
If the object is on another form that might be closed, add logic to check if the form is open (e.g., using the CurrentProject.AllForms collection) before executing the print command.

Isolate the Print Routine to a Dedicated Button
Remove conflicting code (such as TSLOnly logic) and create a separate, clean print button to process the routine independently.
Looking for a Lighter, More Reliable Office Suite?
While Microsoft Access is a powerful database tool, troubleshooting complex VBA errors like Error 2467 can be incredibly time-consuming. If you are looking to manage data, generate reports, and use macros with less hassle, consider WPS Office. It provides an exceptionally lightweight, free alternative with robust spreadsheet capabilities that support VBA, ensuring seamless data management without the heavy overhead.
- 1. Download WPS Office: Visit the official WPS website and download the free WPS Office installer.
- 2. Install and Launch: Follow the on-screen instructions to install the suite, then open WPS Spreadsheet.
- 3. Manage Your Data: Open your existing Excel workbooks and run your VBA macros smoothly within the WPS environment.

Frequently Asked Questions
What exactly does Microsoft Access Error 2467 mean?
Error 2467 indicates that your VBA expression is trying to reference an object—such as a form, report, or specific control—that is either closed, does not exist, or has been incorrectly named in your code.
How do I find out which line of VBA code is causing Error 2467?
When the error dialog box pops up during execution, click the 'Debug' button. This will automatically open the Visual Basic Editor and highlight the failing line of code in yellow, allowing you to see exactly which object reference is broken.
Why does my print button work sometimes but fail with Error 2467 at other times?
This usually happens when the print button relies on a specific form or report being open. If a user manually closes that prerequisite form before clicking the print button, the VBA code cannot locate the necessary object and throws Error 2467.




