• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Testing a Macro

Although Access doesn't offer very sophisticated tools for testing and debugging your macros, it does give you a method for stepping through each line of a macro:

1.
Open the macro in Design view.

2.
Click Single Step on the toolbar or choose Run | Single Step.

3.
To execute the macro, click Run. The first line of the macro is executed, and the Macro Single Step dialog box appears, showing you the Macro Name, Condition, Action Name, and Arguments. (See Figure 11.18.) In the figure, the Macro Name is mcrPersonalInfo, the Condition evaluates to False, and the Action Name is MsgBox. The MsgBox arguments are You Are Over a Quarter Century Old, Yes, and Information.

Figure 11.18. In the Macro Single Step dialog box, you can view the macro name, condition, action name, and arguments for the current step of the macro.


4.
To continue stepping through the macro, click the Step button on the Macro Single Step dialog box. If you want to halt the execution of the macro without proceeding, click the Halt button. To continue normal execution of the macro without stepping, click the Continue button.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint