Tabbed form as 'clickable' table of contents?

G

Guest

Hi!

I am creating a tabbed form as a user guide and wondered if it's possible to
have links to each tab page from another page - sort of like a table of
contents. A user could click to the desired page from this first tab form
page in my imaginary world.

Is it real and possible?

Thanks for any assistance!
 
S

Sandra Daigle

Hi Kathy,

You can do this easily enough but realize that to get back to the table of
contents, the user is going to have to click the tab for the first page
(unless I'm really misunderstanding your intent). Here's some simple code to
help you - first create a label for each "link". You can format it however
you'd like then create a Click event for each label. The click event merely
sets the value of the tabcontrol to the pageindex of the requested page.

I've done this two ways - one using the absolute index - note that the page
index starts with 0 for the first page. The last event procedure I've shown
uses the name of the page itself as a more relative method of specifying the
pageindex. I prefer this since the actual page index may change if you add
or remove pages whereas once you've named the page, you aren't likely to
make changes to the name.

Private Sub lblPage2_Click()
Me.TabCtl0 = 1
End Sub

Private Sub lblPage3_Click()
Me.TabCtl0 = 2
End Sub

Private Sub lblPage4_Click()
Me.TabCtl0 = Me.TabCtl0.Pages("Page4").PageIndex
End Sub
 

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