MS Access 2003不进入调试模式并忽略断点 [英] MS Access 2003 does not enter into debug mode and ignores breakpoints

查看:283
本文介绍了MS Access 2003不进入调试模式并忽略断点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在MS Access 2003模块中开发了一个小型VBA程序(只有一个public Sub)
数据库仅为我锁定,没有人可以访问该文件。
我的代码正常工作,但是我想要找到一个小错误,并且修复

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

我需要调试我的VBA代码。我把断点放在程序的第一行。

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

但是,当我运行这个代码时,它永远不会在断点停止,不会进入调试模式。看起来像VBA调试器不工作或禁用。我无法找到任何可以禁用/启用VBA调试器的选项,我认为它应该始终启用。现在我可以通过放置很多消息框来调试这个代码,但需要很多时间...

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

推荐答案

请参阅:

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

启用使用特殊访问密钥启动选项。

为此,请按照下列步骤操作:

To do so, follow these steps:


  1. 打开设置了断点的数据库。

  2. 在工具菜单上,单击启动。

  3. 在启动对话框中,单击以选中使用特殊访问键
    复选框。

  4. 单击确定关闭启动对话框。

  5. 关闭然后重新打开数据库。

  6. 运行包含断点的代码。请注意,
    代码的执行在断点处暂停,如
    所期望的那样。

  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.


这篇关于MS Access 2003不进入调试模式并忽略断点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆