Others

Fix the Object Name Argument Error in a Microsoft Access Button

Algirdas JasaitisAlgirdas Jasaitis Nov 14, 2026 869 views

Question details

Resolve an Object Name Argument error when an Access form button opens another object.

Fix the Object Name Argument Error in a Microsoft Access Button
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.
Before you start

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.

Solution 1Recommended

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.

1
Open the On Click event

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.

2
Match the action to the object

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.

3
Check VBA if applicable

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".

4
Save and test

Save the macro or VBA changes, switch the source form to Form View, and click the button to test the destination.

Check the button's action and destination object
Names containing spaces: Access object names can contain spaces. Select the existing name in the macro's object-name list; square brackets may be used when a name is referenced in certain expressions, but are not needed inside a VBA string.
Free Microsoft Office alternative

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.

Create and edit documents, spreadsheets, and presentations in a familiar interfaceOpen and work with Microsoft Office formats, including DOCX, XLSX, and PPTXUse spreadsheets for tabular work alongside Access database workflowsMove common Office files without learning a completely new interface
microsoft office alternative - wps office

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.