form tabs

B

Bill H.

I have a form with several "tabs."

Upon a certain condition I want to set a particular tab to be the active
tab.

How do I do that?

Thanks.
 
A

Allen Browne

Set the Value of the tab control.

If you like, you can refer to the PageIndex of the desired page control, so
your code continues to work even if you reorder the pages, e.g.:

Me.MyTab = Me.MyPage.PageIndex
 
B

Bill H.

I don't think I'm quite following.

I want to do this: me.<tabvalue or name>.setfocus
 
A

Allen Browne

Try it, Bill.

Setting the Value of the tab control is the way to set focus to a particular
page.
 
B

Bill H.

Sorry, Allen.

My confusion was (and is) over what to substitute for your "MyTab" and
"MyPage" values, and how to relate to what I had going.

I stumbled onto this, which seems to work:

Me!TabCtl0.Pages(6).SetFocus

though I don't really understand what is going on. The name for that
particular tab includes a space and ampersand so a character is underlined
on the tab and can be gotten to via alt-letter.


--Bill
 

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