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
|
Open a macro in the Macro window.
|
|
Click the Conditions button on the Macro Design toolbar.
|
|
Click the Build button on the Macro Design toolbar to open the Expression Builder.
|
|
Enter an expression that Access could evaluate as either true or false.
|
|
Click OK.
|
|