Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MS Access 2003 does not enter into debug mode and ignores breakpoints

I developed a small VBA procedure in MS Access 2003 module (just one public Sub) The database is locked for me only, nobody else has access to the file. My code works but there is a small bug I want to find and fix

I need to debug my VBA code. I put breakpoint at the first line of the procedure.

However, when I run this code, it never stops at the breakpoint and never enters to debug mode. Seems like VBA debugger is not working or disabled. I was not able to find any option how it is possible to disable/enable VBA debugger, I supposed it should be always enabled. Now I can debug this code only with the help of putting a lot of message boxes, but it takes a lot of time...

like image 820
Bogdan_Ch Avatar asked Sep 25 '09 08:09

Bogdan_Ch


2 Answers

Please see:

  • ACC2002: Breakpoints Are Ignored in Visual Basic for Applications Code

Enable the Use Special Access Keys startup option.

To do so, follow these steps:

  1. Open the database in which the breakpoint has been set.
  2. On the Tools Menu, click Startup.
  3. In the Startup dialog box, click to select the Use Special Access Keys check box.
  4. Click OK to close the Startup dialog box.
  5. Close and then reopen the database.
  6. Run the code that contains the breakpoint. Note that execution of the code pauses at the breakpoint, as you would expect.
like image 152
Mitch Wheat Avatar answered Oct 23 '22 00:10

Mitch Wheat


Office 2010 Steps to resolve:

  1. File
  2. Options
  3. Current Database
  4. Make sure "Use Access Special" is checked.
  5. Close and reopen Database.
like image 24
RubberDuck Avatar answered Oct 22 '22 22:10

RubberDuck