1

This is really annoying. In MS Access VBA, there should be linebreak and debugging, however it always go through my code without hitting any of my breaks. Is there somewhere where I need to enable it first? I have the following option:

Option Compare Database
Option Explicit
Cœur
  • 37,241
  • 25
  • 195
  • 267
Bill Software Engineer
  • 7,362
  • 23
  • 91
  • 174
  • Have you compiled? You may have some coruption. – JeffO Sep 23 '11 at 18:52
  • Go to Tools>Startup>Advanced>Special Keys and make sure breakpoints aren't turned off. If that's not the issue try exporting the module/form, removing it, then re-importing it. – Tim Williams Sep 23 '11 at 18:53
  • 1
    The fact is there are break points, and the ability to step through code line-by-line, and to check the call stack and everything else. What are your current settings? And what isn't working? Have you investigated the DEBUG and VIEW menus in the VBE? – David-W-Fenton Sep 26 '11 at 20:27

4 Answers4

8

I did face this issues in MS Access 2010.

All you need to do is uncheck "Use Access Special Keys"

Option available under Access Main Menu .. do the following:

Select File -> Options -> Select General Database 

Check or uncheck "Use Access Special Keys"

Close and Open file and you are done.

Artur Udod
  • 4,465
  • 1
  • 29
  • 58
Zico
  • 96
  • 1
  • 2
2

In VBE options, you need to make sure that the choices on the GENERAL tab are chosen correctly. I recommend these settings:

  • BREAK IN CLASS MODULE (not BREAK ON ALL ERRORS, because the latter will not show you which line in a class module has caused the problem)

  • COMPILE ON DEMAND turned OFF.

When you're coding, I recommend turning OFF AUTO SYNTAX CHECK on the EDITOR tab, because I can depend on the code turning red to tell me that it doesn't compile, without the interruption of a dialog popping up.

David-W-Fenton
  • 22,871
  • 4
  • 45
  • 58
0

I am sure you'd love this question. Check the answers. Mine is quite complete. erl and MZ-tools are the keys to "real" debugging in MS-Access

Community
  • 1
  • 1
Philippe Grondier
  • 10,900
  • 3
  • 33
  • 72
0

You can also write Stop in your code to cause the debugger to break.

Christian Specht
  • 35,843
  • 15
  • 128
  • 182