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

Firing an event when leaving a page in a form

Status
Not open for further replies.

ralphcarter

Programmer
Aug 8, 2006
28
US
I have inherited a program that contains forms with multiple pages on each form. I need an event I can fire when leaving a page on the form. Would this be the deactivate event? I would like to do page validation among other things.

Thanks
Ralph
 
Well, you could just use the page's lost focus, or you could put in a custom method to call (as I have done) for both the "leaving" and "arriving" page. I have a method called "ActiveTab" and one called "DeactiveTab" that I can call when the tabs of the page frame change. Call it from the click event of the "Landing" page.


Best Regards,
Scott

"Everything should be made as simple as possible, and no simpler."[hammer]
 
Take care, deactivate method is a little dangerous. It fires also if you call for example any other (sub)form from your page.
 
Thanks everyone. It does appear that the deactivate event is what I'm looking for.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top