[ Team LiB ] Previous Section Next Section

Creating Conditional Macros

Sometimes you may want a macro to run only if some prior condition is met. For example, you could create a macro that prints a report only if the number of records to print is greater than zero. You can do this by creating a conditional expression, an expression that Access evaluates as true or false. If the condition is true, Access carries out the actions in the macro or macro group.

Create a Macro Condition

graphics/1_icon.jpg

Open a macro in the Macro window.

graphics/2_icon.jpg

Click the Conditions button on the Macro Design toolbar.

graphics/3_icon.jpg

Click the Build button on the Macro Design toolbar to open the Expression Builder.

graphics/4_icon.jpg

Enter an expression that Access could evaluate as either true or false.

graphics/5_icon.jpg

Click OK.

graphics/13inf15.jpg

    [ Team LiB ] Previous Section Next Section