Microsoft Access 2010 Bible

(Rick Simeone) #1

Chapter 15: Using Access Data Macros


567


When you double-click an item, it’s added to the macro in its most logical destination. For exam-
ple, in Figure 15.10, an If flow item has been added to a blank macro.

FIGURE 15.10

Adding an If block to a new macro


Add New Action
(inside If block)

Add New Action
(outside If block)

If block

In Figure 15.10, notice that the If block is highlighted with a gray background indicating the
extent of the If block. Even though the input cursor is positioned in the Conditional expression
box, double-clicking the SetLocalVar macro action adds it within the body of the If block, as
shown in Figure 15.11. When you drag an item from the Action Catalog, you can drop it exactly
where you want it in the macro’s design.

Figure 15.11 can be a bit confusing because of the change from Figure 15.10. The SetLocalVar
action is now highlighted with the gray background, and the border around the If block has dis-
appeared. You have to watch for the If statement that begins the If block and the End If that
ends the block to know its extent.
Free download pdf