ACC2000: Breakpoints Are Ignored in Visual Basic for Applications Code (296848)
The information in this article applies to:
This article was previously published under Q296848 Moderate: Requires basic macro, coding, and interoperability
skills.
This article applies to a Microsoft Access database (.mdb) and to a
Microsoft Access project (.adp).
SYMPTOMS When you add a breakpoint to a Visual Basic for
Applications (VBA) procedure or function, the breakpoint is ignored and the
code runs to completion without pausing, as you would expect. CAUSE This behavior is by design and occurs when the Advanced Startup option, Use Special Access Keys, is disabled. RESOLUTION Use the keyword Stop instead of a breakpoint to halt execution of the code at a
specific point. -or- Enable the Use Special Access Keys option in the Startup dialog box. To do so, follow these steps:
- Open the database in which the breakpoint has been
set.
- On the Tools menu, click Startup, and then in the Startup dialog box, click Advanced.
- Click to select the Use Special Access Keys check box.
- Close the Startup dialog box.
- Close and then re-open the database.
- Run the code that contains the breakpoint. Note that
execution of the code pauses as expected at the breakpoint.
Modification Type: | Minor | Last Reviewed: | 10/11/2006 |
---|
Keywords: | kbprb KB296848 |
---|
|