Fix the Object Name Argument Error in a Microsoft Access Button
Question details
Resolve an Object Name Argument error when an Access form button opens another object.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- A button on an Access form is configured to open a destination form.
- Observed behavior
- The button's On Click event displays “This action requires an Object Name Argument” when it runs.
In the Access Navigation Pane, confirm whether the destination is a form or a report and note its exact name. Open the source form in Design View so you can inspect the button's On Click event.
Check the button's action and destination object
Use this approach to correct a missing object name or an action that targets the wrong object type.
In Design View, select the button, open its Property Sheet, and choose the Event tab. Next to On Click, select the build button (...) to open the assigned macro or event procedure.
In the macro, use OpenForm for a form or OpenReport for a report. In the Form Name or Report Name argument, select the exact destination from the list.
If On Click uses an event procedure, inspect the DoCmd.OpenForm or DoCmd.OpenReport line in the VBA editor. Supply the exact object name as a quoted string, such as DoCmd.OpenForm "Grocery Lockout Dates".
Save the macro or VBA changes, switch the source form to Form View, and click the button to test the destination.

Recreate the button with the appropriate destination
Try a new button if the existing event still fails after you verify its action and object name.
Work with Office documents using WPS Office
WPS Office is a free, lightweight alternative for everyday document, spreadsheet, and presentation work. Its familiar interface and Microsoft Office format compatibility make moving common files straightforward. It does not repair Access macros or replace Access databases.

Frequently Asked Questions
Where do I find the button's On Click macro?
Open the form in Design View, select the button, and open the Property Sheet. On the Event tab, use the build button (...) beside On Click to inspect the assigned macro or event procedure.
Should I use OpenForm or OpenReport?
Use OpenForm when the destination is a form and OpenReport when it is a report. Check the object's type in the Access Navigation Pane, then select its name in the corresponding macro argument.
Do I need to remove spaces from the destination name?
No. Access object names can contain spaces. Select the exact name in the macro argument, or use the exact name in quotation marks when passing it to DoCmd.OpenForm or DoCmd.OpenReport in VBA.
What if the destination name is correct but the button still fails?
Recheck the complete On Click macro or VBA procedure for another action with a missing object name. You can also create a new button with the Command Button Wizard and test it in Form View.




