views:

395

answers:

1

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...

+3  A: 

Please see:

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.
Mitch Wheat
You just saved a day of my life!!! I was playing with this option but never think that I need to close and reopen the database. Thank you!
Bogdan_Ch
happy to help. :)
Mitch Wheat