Access 2016 Advanced

Access 2016

Lesson 11 – Using Macros

Steps

Practice Data

Click and move the Limit macro to the blank after the plus.

3. Type the Then expression in the field

Close the Macro Tools Design tab and save the macro. Open the Customers1 form in Form view and click the Credit Limit field. Notice that the message box does not open because the credit limit for this customer is above $3000. Move to record 5. Notice that the message box now opens because the credit limit for this particular customer is under $3000. Select OK to close the message box. Close the form window.

C REATING A G ROUP M ACRO

Discussion

A macro group is a collection of related submacros all stored together in a single macro object. A macro group has several advantages. The most obvious advantage is that it reduces the number of macros that appear in the window. More importantly, it allows you to organize your macros by grouping related macros together onto a single macro sheet. For example, if you created several macros that are related to one form, you can group all of them together on one macro sheet.

Like any other macro, a group macro must be saved with a name. Make sure the group macro name is descriptive enough to indicate its contents. This helps other users know what macros are contained in the group macro. For example, if all the macros relate to the Orders form, name the group macro Order Form Macros .

When macros are grouped, you can still refer to individual macros.

OFFICEPRO, Inc.

Page 131

Made with FlippingBook - Online magazine maker