Nested Tab Controls

Rats

Registered User.
Local time
Tomorrow, 00:13
Joined
Jan 11, 2005
Messages
151
I have placed a tab control within a tab control (which I have done before). The problem is that the sub tab control appears on every page of the main tab form (encountered this before). I fixed it in the past by placing code on the on open event to make the sub tab control not visible unless the appropriate tab is selected. That worked fine.

I have tried this in the new program and find that when I set the value of the main tab form to 4 (the page index of the tab) the sub tab form will not display at all. However if I set it to zero it will display regardless of which tab is selected. Confusion has now set in :confused: . Any thoughts out there on what I have done incorrectly.

[/CODE]Private Sub Form_Open(Cancel As Integer)

'Me.OrderBy = "RankNo desc"
'Me.OrderByOn = True
If TabCtl44.Value = 4 Then
TabCtl144.Visible = True
Else
TabCtl144.Visible = False
End If
End Sub
Code:
 
I'm not sure what your problem is but another solution might be a SubForm with a tab control. Just another way to display a tab control on a tab control.
 
Great Minds think alike RG. I rethunked the approach and used a subform with the tabbed form enclosed. It worked fine. Still can't fathom why the other system wouldn't work when I have done it before. I think the subforms a cleaner approach anyway. Thanks for the help.
 
Glad you got it working. Thanks for posting back.
 
Thanks for that Pat. All OK with this one now it works fine.
 

Users who are viewing this thread

Back
Top Bottom