FIGURE 36-17
Use the Macro Single Step dialog box to step through a macro.
n MsgBox: Use the MsgBox action to display values of variables, error messages, control
settings, or whatever else you want to see while the macro is running. To see the value of
a combo box on a form, set the Message argument as follows:
[Forms]![frmReportMenuEnhanced]![cboReport]
n StopMacro: Use the StopMacro action to stop the macro from executing. Insert this
action at any point in the macro to stop it at that point. Use this in conjunction with the
debug window to check values.
n Debug window. Use the Debug window to look at any values, temporary variables, or
properties of the MacroError object after you stop the macro. Press Ctrl+G to display
the code window after you stop the macro. Just type a question mark (?) and the variable
1156
Professional Database Development Part IV
or expression you want to check the value of, and press Enter. Some examples of expressions
to display in the Debug window are:
? TempVars!MyNum
? MacroError!Description
? [Forms]![frmReportMenuEnhanced]![cboReport]
These techniques are similar to ones you??™d use when debugging VBA code.
Pages:
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162