Why is my VBA for MS Access Buggy?

This is a kind of vague question and hard to explain. I am trying to encode my access database, but part of VBA really annoys me. Whenever I type something and press the spacebar, it automatically remakes this space and puts me back against the previous word that I typed. In addition, Intellisense will appear within a second, appear to flicker and disappear, and return my cursor to the text I was just printing. This leads to the fact that I constantly print things in those places where they should not be, and the absence of spaces between the elements of my code. Does anyone know why this is happening? The database that I use was created in Access 2007, but I develop it in 2010. At the top, it reads Microsoft Access 2007-2010.

Thank you for your help.

+8
vba access-vba ms-access ms-access-2007
source share
1 answer

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

What happens is that when editing the code, the code works at some regular interval. Each time another code is executed, the exact-at-time compiler for VBA starts.

Usually, when you write code, this compilation in real time occurs whenever you go from one line of code to another: compilation errors occur, spaces, spaces, etc. are removed.

However, in your case, you have a piece of code that works. Before it can start, the compiler must work. And he does the same thing that he usually does. Most annoyingly, it cuts off the final white space from your line.


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

+13
source share

All Articles