Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to not trigger activate event 1

Status
Not open for further replies.

ronphx

Programmer
Jun 24, 2004
64
US
I am running a form with several related forms. To save time, I would like to load the related forms when loading the initial form. A problem that I am having is that when I load the related forms are loaded it triggers the related form's on_activate event even though I don't want to run it until that form is actually visible and has focus. I have tried opening the form hidden:

DoCmd.OpenForm ("frminvoicefinish"), , , , , acHidden

and I've tried loading the form:

load form_frminvoicefinish

but both trigger the activate event.

Am I doing something wrong, or is there another way to accomplish my objective?

Thanks.
 
I believe that when a form opens there is a sequence of "things" that happen in a certain order. The "visible" event is AFTER the "on_activate".

you don't mention how you move from the one "visible" form to one of the hidden forms. If by chanse you use a button, try moving the on_activate code for that particular (the hidden) form to run from the button (you will have to adjust the code somewhat).

 
That information is very helpful (the "visible" event is AFTER the "on_activate"). Unfortunately, that form is made visible and activated from several other forms. However, I can easily do a "work around" the first time the form is activated when it is loaded.

Thanks for the help.
 
Uh, sorry to disagree, but I believe there is no 'visible' event.

See the Help file: search Order of Events





Sam_F
"90% of the problem is asking the right question.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top