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

Seting focus to Tab gives out run-time error

Status
Not open for further replies.

lopexo

Programmer
Joined
Oct 3, 2003
Messages
5
Location
US
Hi,

I am using the following statement to cycle between tabs in an access form

Code:
   frm.Controls(TabControlName).Pages(TabPageName).PageIndex = 0
    frm.Controls(TabControlName).Pages(TabPageName).SetFocus

It all works fine when the form is opened and focus is set to the 1st tab and also when you click any of the other tabs, however, when I click back on the 1st tab, I get the following error.

"Object doesn't suport this property of method."

I can continue clicking on any of my other tabs, except the 1st one. any ideas??

thanks

 
Try just setting the value of the Tab Control to the page you want.

frm!TabControlName.Value = 0 (or whatever page you want)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top