Visual Basic Editor

G

Guest

I am going crazy! Today when I go into visual basic editor and enter a new
line of code it keeps trying to autocorrect. As soon as I type something the
preceding text goes red. The drop down list of options appears for an instant
and then dissapears, eg if I type "Me.Parent. etc" , as soon as I type in the
.. the drop down list appears for a moment and then dissapears and the line
goes red. I have tried changing the Options under Tools , all to no avail.
any suggestions?
Thanks
dhowe
 
D

Douglas J. Steele

Are you using a timer anywhere in your application? What you're describing
often happens under those circumstances, so you need to disable the timer.
 
G

Guest

I am not intentionally using a timer. Is there any way to search for timers
in my code? This problem doesn't happen in my backup copies from a couple of
days ago.
 
R

Rick Brandt

dhowe said:
I am not intentionally using a timer. Is there any way to search for timers
in my code? This problem doesn't happen in my backup copies from a couple of
days ago.

It would have to be running in a form that you have open at the same time you
are in the code editor.
 
G

Guest

Another clue is that as I type in a line of code and a space after the word
the cursor jumps back to the end of the previous word. Also if I am typing in
a word such as "True" the cursor jumps back in front of the "T"
Thanks again for any help
 
G

Guest

Thanks a million!!
I had a textbox showing the current Time on the form. Once I deleted it the
problem went away.
Thanks again
dhowe
 
G

Guest

I thought I had it beaten but I was wrong.
I deleted my clock and the editor worked fine but next time in it was doing
the same thing.
It is fine in design mode and tries to autocorrect in all my forms.
 
D

Dirk Goldgar

dhowe said:
I thought I had it beaten but I was wrong.
I deleted my clock and the editor worked fine but next time in it was
doing
the same thing.
It is fine in design mode and tries to autocorrect in all my forms.

This is the classic symptom of having a form open with a Timer event
that is firing, as Doug and Rick pointed out. In the Access application
window (as opposed to the VB Editor window) check every open form -- and
subforms on those forms -- to see if it has an active Timer event. Bear
in mind that forms may be hidden, in which case you may click the menu
item Window -> Unhide... (if that option is disabled, there are no
hidden forms).

I suppose it is possible that your symptoms are caused by something
else, but I have never seen such a case. We've seen these symptoms a
lot, and it has always been due to the firing of a Timer event. Do you
understand what we mean by a Timer event? The relevant properties in a
form's property sheet are the Timer and TimerInterval properties on the
Event tab of the form's property sheet in design view.
 
G

Guest

Thanks Dirk.
I deleted my clock but left my timer "event procedure" and my timer interval
in the event properties. Once I deleted these it was fine. If I needed a
clock on my form how would i do it without having the same problem?
 
D

Dirk Goldgar

dhowe said:
Thanks Dirk.
I deleted my clock but left my timer "event procedure" and my timer
interval in the event properties. Once I deleted these it was fine.
If I needed a clock on my form how would i do it without having the
same problem?

I don't think you can, without going to extreme lengths -- setting up
some task external to Access that would run the timer. But there's
nothing wrong with having a timer event on a form; it's just that you
don't want to edit code while that form is open in form view and the
timer is running. Is there some reason you need to have this clock form
open while you're editing code?
 
Joined
Jul 26, 2010
Messages
1
Reaction score
0
I just wanted to let you all know that this absolutely drove me insane - until I found this thread. My MainForm HAD a clock on it that refreshed every second via the timer function. Now it just refreshes once a minute!


Any ideas on getting a clock to refresh every second WITHOUT using the timer function on the form?

Thanks to all who make this a GREAT forum!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top