Dim statement (1 Viewer)

billmark

Registered User.
Local time
Yesterday, 23:32
Joined
Mar 28, 2012
Messages
25
Hi
I try to write a DIM statement in the private sub. When I type the word dim, it turns red and can't let me continue to write the code.

Please advise how to fix.

Regards
 

Ranman256

Well-known member
Local time
Today, 02:32
Joined
Apr 9, 2015
Messages
4,337
strange.
can you type the full Dim line in notepad then paste it?
 

sneuberg

AWF VIP
Local time
Yesterday, 23:32
Joined
Oct 17, 2014
Messages
3,506
One thing that would do that is if there is a timer running. If that's the case then close the form with the timer.
 

billmark

Registered User.
Local time
Yesterday, 23:32
Joined
Mar 28, 2012
Messages
25
It works if I close the form with timer. Why? That is I can't write any code in the form with timer or how to overcome this.
 

sneuberg

AWF VIP
Local time
Yesterday, 23:32
Joined
Oct 17, 2014
Messages
3,506
You can write code in the form with the timer just not when the form is open in form view. Why would you need a form to be open when you are writing code?

Googling "ms access why do timers affect the vba editor?" does seem to give any good answers as to why? In my opinion this is a bug. Apparently when the process thread is switched to run the timer it does return to the editor thread in the same state as in left.
 

Users who are viewing this thread

Top Bottom