Select tab from code

S

swas

Hi,

I want to be able to change the current tab in a tabstrip control from code,
preferably using the caption, but am struggling with the correct syntax.

Can anyone help?

Thanks in advance.


swas
 
R

ruralguy via AccessMonster.com

Look in VBA help under PageIndex. You probably want the Pages property.
 
S

swas

RG,

Yes I had looked at the pageindex property, but wasn't sure how to use it to
actually change the current viewed tab.

Setting the tabstrip default property changes the tab, ie:

tabTabStrip = intIndex

and I can loop through all pages first to find the match for my caption
search.

Thanks


swas
 
F

Falken227

I don't know if this is what you are looking for but you can refer to a tab
just using it's name.

For instance, I have a tab control with a tab named "tabCalendar" with a
caption of "Calendar" that is hidden until a date control is clicked on and
the calendar on the tab is needed.

To make the tab visible I just need to put into code

tabCalendar.Visible = True
tabCalendar.SetFocus

Essentially you treat it as if it is any other control on the form.

jason
 
S

swas

Jason,

I'm trying to select a page within the tab - from what I can see of your
note you are referring to the tab control itself.

As per my previous post, I managed to work it out though.

Thanks for the note.


swas
 

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