Tab control inside a Tab Control

  • I want to put a tab control inside another Tab Control. I have 10 tabs on the parent tab control. When I try placing a tab control in the 6th tab of the parent tab control, it works but when I move to another tab on the parent tab, the child tab control shows up on every tab of the parent tab control. How do I get it to only show up on 1 of the parent tab that I place it on?

  • That's a common problem in trying to nest tab controls. The usual way around it is to put a subform on the tab where you want to put the second tab control. Then place the tab control on the subform and it should work just fine. You may or may not need to bind the subform to a value on your main form depending on the nature of your design.

    Wendell
    Colorful Colorado
    You can't see the view if you don't climb the mountain!

  • Yes, that worked! thanks. Now I have another issue related to this.

    I have my main form called: F_workspacePP

    Then I have a Tab control called: TabMain

    I then created a subform called: SubFrmPPTab5 (I put this subform in Tab5 of the TabMain)

    Inside the subform called (SubFrmPPTab5), I have a Tab Control called: SubTab

    On the first tab called Tab1 of SubTab, I have a subform called: SubFrmTab05PP

    I don't want SubFrmTab05PP to open with the record source filled in until I click on Tab1. So I am filling in the recordsource when they click the tab and when they close the main form, I am clearing the recordsource. What is the syntax for getting to the recordsource?

    I have something like this for another tab without the tab control within a tab control:

    Forms!F_workspacePP.[SubFrmTab02PBD].Form.RecordSource = ""

    I tried chaning it to work on the one that has a tab control within a tab control to this:

    Forms!F_workspacePP.[SubFrmPPTab5].Form.SubFrmTab5PP.RecordSource = ""

    Is this correct?

  • That appears essentially correct - the general syntax for referencing a control on a subform is:

    Forms![main form name]![subform control name].Form![control name]

    and having the subform control in a tab control doesn't really alter the method of referring to it, even if the actual subform is contained within a subform on a tab control.

    Wendell
    Colorful Colorado
    You can't see the view if you don't climb the mountain!

  • thanks! that worked

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply