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

How to use a click event to go from a subform to main form

Status
Not open for further replies.

rew2009

Technical User
Apr 21, 2009
114
US
I have a main form with tabbed pages and a subform on one of the pages that when I double click on a field on that subform I want it to leave that subform and take me to the main page of the main form. I used the following code to take me to the main page from other pages of the main form. However when I put it into a click event on the subform it doesn’t work.

Me.TabCtl0.Pages("MAIN").SetFocus

How do I do it from within the subform?

Thanks

 
I'd try this:
Code:
With Me.Parent.Form
  .SetFocus
  .TabCtl0.Pages("MAIN").SetFocus
End With

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top