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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

stopping or controlling events

Status
Not open for further replies.

Honestmath

Technical User
Jan 8, 2003
25
US
hey all,

how do people control events on their forms when they don't want them to fire?

i have a form with two subforms, one form controls the parent's recordsource. when user changes a record in subform A , it changes the recordsource for main, which causes subform B's current event to fire. problem is, it fires 10 or twenty times because i change things in subform A and then in the main form ( e.g. a change in LinkedMasterfields fires it).

the gist: how do i keep my subform from firing all it's events until i'm ready for it to do that?

thnx a bunch,

Math



 
You may not like this answer but you could do it using global variables. Unfortunately you would need to set their values appropriately and then check their values in each of the events to see whether or not you should proceed with executing the code.
 
hey,

yeah, that's what i do now, problem is that global variables are not always initialized properly or the order is wacky because subforms "open" execute before the parent forms.

thanks though,

Math


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top