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.
Control properties, Events tab.
To assign a macro to an event:
- Create the macro. See Chapter 13 (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.
- Click Assign and select the macro.
Assign action dialog box
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.