Fix Microsoft Access Button Macros in Navigation Forms
Question details
Make Back, Close, and Next button macros work when an Access form is displayed inside a navigation form.

- Product
- Microsoft Access for Microsoft 365
- Device & OS
- not provided
- Scenario
- A form that works on its own is opened within an Access navigation form.
- Observed behavior
- The button macros behave differently or fail when the form is hosted inside the navigation form.
Open the navigation form in Design View and identify the name of the control that hosts the form. Also identify whether each button is meant to navigate records, switch forms, or close a form.
Update button macros for the navigation subform context
Use this approach when macros work in a standalone form but fail or target the wrong object inside a navigation form.
A form hosted in a navigation form is accessed through the host's subform control. References that worked when the form was open independently may need to be qualified through that control.
Open the navigation form in Design View, select the control that displays the embedded form, and check its Name on the Property Sheet. The control name may differ from the name of the form it contains.
Open the embedded form in Design View, select a button, and use the Property Sheet's Event tab to open its On Click macro with the builder button.
Review expressions that refer to the embedded form or its controls. For a control on the hosted form, a reference can use Forms![NavigationForm]![NavigationSubform].Form![ControlName]; replace each placeholder with the actual navigation form, host control, and control names.
In the macro designer, check any GoToRecord and CloseWindow actions. Make sure record navigation targets the intended form and that a close action identifies the intended object rather than unintentionally closing the navigation form.
Save the macros, open the navigation form in Form View, and select the navigation button that displays the embedded form. Test Back, Next, and Close there, then adjust any references or action targets that still behave incorrectly.

Use WPS Office for compatible documents and spreadsheets
WPS Office is a free, lightweight alternative with a familiar interface for working with Office documents and spreadsheets. Its format compatibility makes it easier to move everyday files between Office suites. It does not run or repair Access database forms or macros.

Frequently Asked Questions
Why does my Access macro work only when the form opens directly?
Inside a navigation form, the form is hosted through a subform control. References to the form or its controls may need to include the navigation form and host control, rather than referring to the form as if it were open independently.
How do I find the navigation subform control name?
Open the navigation form in Design View, select the control that displays the hosted form, and check its Name on the Property Sheet. Use that control name in qualified references.
Why does my Next button affect the wrong record?
The GoToRecord action may be operating in a different form context when the form is embedded. Open the button's On Click macro in Design View and review the action's target, then test it inside the navigation form.
Can WPS Office fix or run Access macros?
No. Edit and test Access forms and macros in Microsoft Access. WPS Office can instead be used for compatible documents and spreadsheets, including DOCX and XLSX files.




