Part II: Programming Microsoft Access
540
Removing a breakpoint involves nothing more than clicking on the breakpoint indicator in the
Margin Indicator bar. Breakpoints are also automatically removed when you close the application.
FIGURE 14.15
Setting a breakpoint is easy.
When execution reaches the breakpoint, Access halts execution and opens the module at the
breakpoint (see Figure 14.16). You now use the Immediate window (see the preceding section) to
examine the values of variables and perform other operations, or use any of the other debugging
tools described in the “Using the Access Debugging Tools” section. Neither the code window nor
the Immediate window are modal, so you still have full access to the development environment.
FIGURE 14.16
Execution stops on the breakpoint.
Figure 14.17 illustrates two techniques for viewing the values of variables while execution is
stopped at a breakpoint. The Locals window contains the names and current values of all the vari-
ables in the current procedure. If you want to see the value of a variable in a slightly different for-
mat, use the print command (?) in the Immediate window to display the variable’s value.