Click the drop down button as illustrated in the following screen shot.
Then, click “Macro” to create a new macro.
The macro editing screen is as follows:
In the “Action” column, use the drop down box to select “RunCode”. Automatically changes the “Action
Arguments” (buttom of the screen) to ask for the “Function Name”.
Enter the name of the subroutine (autoexec) in the textbox. You can also click the ellipsis (...) and choose
the subroutine in a more interactive way. In the “Expression Builder” dialog box, double click the + symbol
next to “Functions”. Then, click Database1. The name of the module that you just created and the function
contained within should display. Double click the name of the subroutine to select it. Then, click “OK” to
accept it.
Next, we need to save the macro. The default name is “Macro1”, which is on the tab. Right click the tab, then
click “Save”. Name the macro “Autoexec”. It is important to use the name “Autoexec” exactly.