Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Tab control inside a Tab Control


Tab control inside a Tab Control

Author
Message
GrassHopper
GrassHopper
SSC-Enthusiastic
SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)

Group: General Forum Members
Points: 193 Visits: 534
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?



WendellB
WendellB
SSC Veteran
SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)

Group: General Forum Members
Points: 247 Visits: 1634
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!
GrassHopper
GrassHopper
SSC-Enthusiastic
SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)

Group: General Forum Members
Points: 193 Visits: 534
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?



WendellB
WendellB
SSC Veteran
SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)

Group: General Forum Members
Points: 247 Visits: 1634
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!
GrassHopper
GrassHopper
SSC-Enthusiastic
SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)

Group: General Forum Members
Points: 193 Visits: 534
thanks! that worked



Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search