Access web app may not correctly execute onload or oncurrent macro events

Assume that you create a new form in an Access web app by using the Home > Create > Advanced option. Then, you add an onload or an oncurrent macro action, or both, and then save the form with a hyphen in the form name. In this situation, the macro event is named incorrectly and may be executed inconsistently.

You may also encounter a "Microsoft Access could not understand the macro format." error when you try to open the macro in an affected form.

This issue occurs because the macro is named incorrectly. You are able to observe this by looking at the macro naming convention when you design the macro. A correctly named macro should show the form name just before the event name.

Incorrectly named form macro event:
Affected macro

Correctly named form macro event:
Unaffected macro
To prevent the issue, rename the form so that it does not use a hyphen in the form name and then save it. If the macro event still doesn't execute correctly, select all macro actions (Ctrl + a) and then delete (Ctrl + x) them from the macro event, save the form, re-create the event and then paste (Ctrl + v) your macro actions back into the event. If neither of these methods resolves the issue, you may want to rebuild the form and make sure that a hyphen is not used in the form name.
More information
Forms that are created from another affected form that uses the duplicate method will also experience this issue. 
Access 2013;Access 2016;Access app;macro;on load;on current; ui macro;

Article ID: 3126962 - Last Review: 12/23/2015 01:53:00 - Revision: 2.0

Access 2016, Access Services in Microsoft SharePoint Server 2013, Microsoft Access 2013, Microsoft Access for Office 365

  • kbsurveynew kbexpertiseadvanced KB3126962