Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jul 2008
    Location
    Suffolk, United Kingdom
    Posts
    308
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Tab control within tab control (2003)

    Hi,

    I am trying to put a tab control within a page of another tab control. I only want to see the second tab control if (in this case) page five of my main tab control is selected. Everytime I try this I can see the second tab control no matter which page is selected from the main tab control.

    I can add text boxes etc with no problem.

    The only thing I can think of is to use a subform, is there anyway of doing this without the use of a sub form

    Many thanks
    Regards
    Gerbil (AKA Kevin)

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Tab control within tab control (2003)

    A tab control is a very special kind of control, since it is a container for other controls. You cannot place a tab control in a tab page, you always place a tab control directly on its parent form.

    I suggest that you reconsider whether you really need a tab control within a tab page.
    If you do, using a subform is one possible workaround.
    Another one is to set the Visible property of the "inner" tab control to No and to use code in the On Change event of the "outer" tab control:

    Private Sub tabOuter_Change()
    Me.tabInner.Visible = (Me.tabOuter = 4)
    End Sub

    (The value of a tab control is the index of the active page, starting at 0, so the 5th page has index 4.)
    A disadvantage of this method is that it only works in form view, not in design view, so it becomes difficult to design the other tab pages of the "outer" tab control.

  3. #3
    3 Star Lounger
    Join Date
    Jul 2008
    Location
    Suffolk, United Kingdom
    Posts
    308
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Tab control within tab control (2003)

    Many thanks Hans

    I tired hiding the inner tab control and its almost impossible to design anything! I think I will reconsider my design and try to find a different option so I wont need to sets of tab controls

    Thanks
    Regards
    Gerbil (AKA Kevin)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •