Linking a macro to a form control
You can set any form control (for example, text box or button) to perform an action when triggered by some event. To see the full list of events, right-click on the form control when the design mode is on, select Control and click on the Events tab (Figure 387).
To assign a macro to an event:
-
Create the macro. (See the chapter titled “Getting Started with Macros†in the Getting Started guide.)
-
Right-click on the form control, select Control and click on the Events tab.
-
Click the ... button to the right of the event to bring up the Assign action dialog box (Figure 388).
-
Click Assign and select the macro.
Macros can also be assigned to events relating to the form as a whole. To assign these, right-click on a form control in the document, select Form and click on the Events tab.