Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Tab control inside a Tab Control Expand / Collapse
Author
Message
Posted Wednesday, December 11, 2013 9:30 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Sunday, October 26, 2014 8:23 AM
Points: 159, Visits: 423
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?


Post #1521960
Posted Wednesday, December 11, 2013 9:55 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Yesterday @ 5:46 PM
Points: 163, Visits: 601
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!
Post #1521968
Posted Wednesday, December 11, 2013 12:18 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Sunday, October 26, 2014 8:23 AM
Points: 159, Visits: 423
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?



Post #1522015
Posted Wednesday, December 11, 2013 4:08 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Yesterday @ 5:46 PM
Points: 163, Visits: 601
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!
Post #1522088
Posted Thursday, December 12, 2013 6:29 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Sunday, October 26, 2014 8:23 AM
Points: 159, Visits: 423
thanks! that worked


Post #1522281
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse