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



Show Me Microsoft Office Access 2003
Show Me Microsoft Office Access 2003
ISBN: 0789730049
EAN: 2147483647
Year: 2002
Pages: 318

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net