Fix the Microsoft Access “Macros Can Only Be Run 19 Times” Error
Question details
The user needs to resolve an Access error that appears when form controls repeatedly run embedded macros.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- A user navigates between forms or performs other actions using buttons that call embedded macros.
- Observed behavior
- Access displays a “Macros can only be run 19 times” error after repeated macro calls.
Identify the buttons and form events involved when the error appears. Open the affected form in Design View and note what each embedded macro does before replacing it.
Replace Embedded Macros with VBA Event Procedures
Use VBA event procedures for the affected form controls instead of repeatedly calling embedded macros.
In the Navigation Pane, right-click an affected form and select Design View.
Select the affected command button, open the Property Sheet, and choose the Event tab. Find the event that shows Embedded Macro, such as On Click.
Change the event property to [Event Procedure], then click the adjacent ellipsis button to open the VBA editor. If prompted, choose Code Builder.
In the generated event procedure, write VBA that performs the original macro's actions, such as opening the intended form. Remove any calls to the original macro if they are no longer needed.
Save the form, repeat the process for other affected controls, and switch to Form View. Click the buttons and navigate between forms repeatedly to check whether the error returns.

Check Other Events and Repeated Calls
Use this check if the error continues after converting the obvious button macros.
Use WPS Office for Everyday Office Documents
WPS Office is a free, lightweight alternative for working with documents, spreadsheets, and presentations. Its familiar interface and Microsoft Office format support make it easy to move everyday files. It does not fix Access errors or replace Access database forms and VBA.

Frequently Asked Questions
How do I make an Access button use VBA instead of an embedded macro?
Open the form in Design View, select the button, and open Property Sheet > Event. Set On Click to [Event Procedure], click the ellipsis button, and write VBA that reproduces the macro's actions.
Why does the error still appear after I convert a macro to VBA?
Another control or form event may still invoke an embedded macro, or an event may repeatedly trigger another action. Check the Event tab for both the form and its controls, then trace relevant VBA procedures with breakpoints.
Does navigating between two forms have a 19-run VBA limit?
The reported error does not establish a general 19-run limit for VBA navigation. If the issue occurs during navigation, inspect the forms' event properties and check for repeated or recursive calls.
Will WPS Office repair my Access database or run its forms?
No. WPS Office is an alternative for documents, spreadsheets, and presentations; it does not repair Access databases or replace Access forms and VBA. Use Microsoft Access to inspect and update the database events.




