为什么我的VBA的MS Access越野车?我的、越野车、MS、VBA

2023-09-08 11:09:51 作者:单身才叫青涩//。

这是一种模糊的问题,很难解释。我试图code我的Access数据库,但VBA部分是真的讨厌我。每当我输入一些东西,打的空间,它会自动重做空间,把我背起来靠在previous字我打字。此外,智能感知上来了一秒钟,闪烁和消失,并恢复我的光标,我是刚键入的文本。这导致我经常打字的地方的东西,他们不应该和我的code元素之间缺乏空间。没有人知道为什么会出现?我使用该数据库是Access 2007中创建的,但我开发它在2010年时,它说的Microsoft Access 2007-2010。

This is kind of a vague question and hard to explain. I'm trying to code my access database, but the VBA portion is really annoying me. Whenever I type something and hit space, it will automatically redo that space and put me back up against the previous word i was typing. Also, Intellisense will come up for a split second, flicker and go away, and revert my cursor to the text that I was just typing. This results in me constantly typing things in places where they shouldn't be and a lack of spaces between elements of my code. Does anyone know why this would be occuring? The database I'm using was created in Access 2007, but I am developing it in 2010. At the top it says Microsoft Access 2007-2010.

感谢您的帮助。

推荐答案

最可能的原因是,你有一个活跃的计时器事件公开的形式。

The most likely cause is that you have a form open with an active timer event.

正在发生的事情是,当你正在编辑code,有code在某个固定时间间隔运行。每当其他code运行时,刚刚在实时编译器VBA运行。

What is happening is that as you are editing your code, there is code running at some regular interval. Each time that other code runs, the just-in-time compiler for VBA runs.

通常,当你在写code,每当从一个线code移动到另一这种实时编译发生:编译错误上调,尾部的空白修剪等

Normally when you are writing code, this real-time compilation happens whenever you move from one line of code to another: compile errors are raised, trailing white space is trimmed, etc.

不过,你的情况,你有一些片运行code。才可以运行,编译器必须运行。并且实现起来通常做同样的事情。最烦人的,它修剪尾随从线的空白。

However, in your case you have some piece of code that is running. Before it can run, the compiler must run. And it does the same things it normally does. Most annoyingly, it trims trailing white space from your line.

解决方案是与活动计时器事件关闭窗体,或设置计时器的时间间隔为0,而你正在编辑code。

The solution is to close the form with the active timer event, or set the timer interval to 0 while you are editing your code.