• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 13. Customizing Access > Assigning a Macro to a Button

Assigning a Macro to a Button

Database designers often attach macros to form controls, particularly buttons, so that when a user clicks the button, the macro is activated. If you create a button, you can use the Command Button Wizard to specify the action that will occur when the button is clicked. If you want to assign a macro to a button, you choose the action of running the macro.

Assign a Macro to a Button

In Design view for a form, click the Command Button tool on the Toolbox.

Click the Control Wizards button on the Toolbox.

Drag the image onto the form, report, or page.

Click Miscellaneous.

Click Run Macro and then click Next.

Choose the macro you want to run, and then click Next.

Specify the text or image that will appear on the button, and then click Next.

Enter a name for the command button control, and then click Finish.

Save the form or report, and then test the button to verify that your macro runs when the button is clicked.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint