为什么一些断点在访问2010中不起作用? [英] Why a few breakpoints don´t work in access 2010 ?

查看:61
本文介绍了为什么一些断点在访问2010中不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Access 2010应用程序,我对环境有一种非常奇怪的行为(好吧,至少对我而言,我之前从未使用过它)。但是这次我只会问下面的内容,因为我找不到原因:



我在vba代码的某些行中设置了几个断点,为了遵循执行流程。很少有人完美地工作,执行停止,我可以一步一步地跟随subsecuent线;但还有其他一些只是不停止,即使它们已经很好地建立。



我在autoexec宏执行的模块中设置的那些工作正常,而不是其他人。



我唯一能看到的是,在autoexec宏执行后出现表格时会加载自定义功能区。



有人可以帮忙吗?



我尝试了什么:



搜索谷歌很长一段时间,但我还没找到任何东西。我快要疯了。

解决方案

你没有显示代码所以...

阅读本页:调试VBA [ ^ ]



建议:确保带有断点的代码中没有停止的部分真正执行。 />
我会通过存储特定的值来确定更多的断点和一些检查点,这些值告诉我们执行了哪些代码序列。



[更新]

不要忘记评论错误处理程序。

每次我遇到这个问题,代码都没有因为某些原因被执行:错误处理程序,失败的测试......

I´m working with an Access 2010 application, and I´m getting a really strange behavior with the environment (well, at least for me, i never worked with it before). But this time I´ll ask only the following, because I just can't find the reason:

I set a few breakpoints in some lines in the vba code, in order to follow the flow of execution. Few of them works perfectly, the execution stops and I can follow step by step the subsecuent lines; but there are others that just do not stop, even they are well stablished.

Those that I set in the modules executed by the autoexec macro are the ones working fine, and not the others.

The only thing i can see is that a customized ribbon is loaded when a forms appears after the autoexec macro execution.

Can anybody helpme ?

What I have tried:

Search thru google for a big time, but i haven´t found anything. I´m about to get crazy.

解决方案

You show no code so ...
Read this page: Debugging VBA[^]

Advice: make sure the parts of code with breakpoint that don't stop are really executed.
I would put more breakpoints around and also some checkpoints by storing specific values that tell which sequences of code have been executed.

[Update]
Don't forget to comment error handlers.
Every times I have got this problem, code was not executed for some reason: and error handler, a failing test ...


这篇关于为什么一些断点在访问2010中不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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