VB Editor

G

Guest

I'm running Access 2002. Recently my VB Editor has begun to act strangely.
When I have my database open and any form is running, the VB Editor doesn't
behave. For example, FormA is running, I open FormB in design mode, when I
go to edit the VBA code in the VB Editor for Form B and enter "me.", the list
of variables appears only for a second...also, when I enter items such as
Application.FollowHyperlink and then enter a "," (comma) the list of options
is supposed to appear and let me choose the ones I want, with FormA open, the
list appears only for a second then disappears. If I close FormA or go into
design mode for FormA, then the VB Editor behaves as it should for FormA and
FormB. I've been through all of the VB Editor options and nothing seems to
change it's behavour.

Does anyone have any idea what the problem is? It was fine until yesterday
and then it starting behaving as described above.

Thanks in advance for your help!
 
G

Guest

PeterM said:
I'm running Access 2002. Recently my VB Editor has begun to act strangely.
When I have my database open and any form is running, the VB Editor doesn't
behave. For example, FormA is running, I open FormB in design mode, when I
go to edit the VBA code in the VB Editor for Form B and enter "me.", the list
of variables appears only for a second...also, when I enter items such as
Application.FollowHyperlink and then enter a "," (comma) the list of options
is supposed to appear and let me choose the ones I want, with FormA open, the
list appears only for a second then disappears. If I close FormA or go into
design mode for FormA, then the VB Editor behaves as it should for FormA and
FormB. I've been through all of the VB Editor options and nothing seems to
change it's behavour.

Does anyone have any idea what the problem is? It was fine until yesterday
and then it starting behaving as described above.

This happens typically when you have a Timer event running on FormA. Every
time the Timer code executes, the VBA editor gets affected. AFAIK the only
solution is to close (or put into design mode) the form with the timer, or
set its TimerInterval property to 0 to keep the timer from firing.
 
G

Guest

thank you John...I changed each form to set the timer value when the form is
opened...each form now has a timer of 0 in it's design

thanks again....this was driving me crazy!
 
G

Guest

wait! crap...that won't work...is there an event that I can use when FormA
looses focus and FormB opens..I tried Got Focus and Lost Focus on FormA and
it doesn't fire when FormB is opened...if there is an event I can use, then
when a form get's focus I will set the timerinterval = 1000 and when it
looses focus, I will set timerinteral = 0...this way, when any form looses
focus, it's timerinterval is set to 0 which means when I bring up the VB
editor, all forms lose focus and their timerinterval should be 0...
 
V

Van T. Dinh

You can use the Timer Event during the normal operation of your database.
Just DON'T open the Form with the Timer Event in normal mode while you are
doing coding.
 
G

Guest

I understand but it's not possible for this database. It's designed so that
the main form is ALWAYS active. The main form contains info that subsequent
forms need and all forms have timer events for displaying the current time.

any other ideas? why doesn't the Lost Focus event for FormA fire when FormB
is opened?
 
V

Van T. Dinh

Why do you need the main Form to be active while you are doing the VBA
coding???
 
G

Guest

The system was designed (not by me) to have hidden fields on the main form
that all subsequent forms need. For example, the user's id, the ForeColor,
BackColor, FontName for their forms, etc. It doesn't matter, it's just
designed that way.

I did some research and found out that the form lose focus event doesnt'
fire when an access form is called that is a popup or another application
window gets focus such as Word or even the VB Editor....the same for the
deactivate event It's beginning to sound like it's not possible to
start/stop the time event for an open form whenever I open the VB
editor...correct?
 

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

Similar Threads


Top