Calling an Event on a Subform

  • Thread starter SurveyorinVA via AccessMonster.com
  • Start date
S

SurveyorinVA via AccessMonster.com

Good morning,

I have a form called frmMainCAD that has a subform who's source object is to
a form called subfrmPSMain.

On the subfrmPSMain I have defined several Public Sub routines that run and
clean up the subform (Requery, clear text, update text, ect.) On the same
form I have data that when I right click (defined a shortcut menu) and select
one of my options to open another form to modify the data (toggles several of
the fields values). The form that the shortcut menu opens is called
hiddenActivateTask and has an OnOpen Event.
Every thing works like a charm on the hiddenActivateTask form as well as
running the public sub from the subform BUT I can not manage to find a way to
call the public sub while the hiddenActivateTask is going through its OnOpen
Event.

My question, what is the proper way to call the Public Sub routine that is
located on a subform from an event on another form.

Any help would be greatly appreciated.
Thanks,
CF
 
S

Stefan Hoffmann

hi,
Every thing works like a charm on the hiddenActivateTask form as well as
running the public sub from the subform BUT I can not manage to find a way to
call the public sub while the hiddenActivateTask is going through its OnOpen
Event.
The problem is the order in which the events are called and what is
possible to do.
My question, what is the proper way to call the Public Sub routine that is
located on a subform from an event on another form.
The first event in which you can securely call routines is the on
current event. You may check the event order yourself: Place a
Debug.Print "FormName.Event" in each of your events. The output will be
written in the immediate window.


mfG
--> stefan <--
 

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