Hide/Unhide Tab

  • Thread starter Mark S via AccessMonster.com
  • Start date
M

Mark S via AccessMonster.com

I am try to hide a Tab control with underlying forms attached. When I click
on a combo box on the main form I want this Tab control to become visible.
When I use the following code I am able to hide/unhide the Tab but not able
to select the actual Tabs.

Any help is appreciated.

Private Sub Combobox_Click()
If [Combobox] Then

Me!TabCtl0.Visible = True

Else

Me!TabCtl0.Visible = False

End If
End Sub
 
R

Rick Brandt

Mark said:
I am try to hide a Tab control with underlying forms attached. When I
click on a combo box on the main form I want this Tab control to
become visible. When I use the following code I am able to
hide/unhide the Tab but not able to select the actual Tabs.

Any help is appreciated.

Private Sub Combobox_Click()
If [Combobox] Then

Me!TabCtl0.Visible = True

Else

Me!TabCtl0.Visible = False

End If
End Sub

What exactly do you mean by "...select the actual Tabs"?

Do you mean that you want to make that page the currently selected page? If so
what code are you using and what is the problem? The code you have above is not
doing anything to affect the current page.
 
M

Mark S via AccessMonster.com

Thanks Rick for your reply. I have a Tab control with 4 tabs on a form. Each
tab has a form attached to it that gets data from underlying queries. I want
the form to load with the Tab hidden. When I click on the combo dropdown that
is on the form I wan the Tab to appear with all 4 tabs accessible. This code
provides the ability for the Tab to appear but the different pages on the tab
won't let me move from one to another.

Mark said:
I am try to hide a Tab control with underlying forms attached. When I click
on a combo box on the main form I want this Tab control to become visible.
When I use the following code I am able to hide/unhide the Tab but not able
to select the actual Tabs.

Any help is appreciated.

Private Sub Combobox_Click()
If [Combobox] Then

Me!TabCtl0.Visible = True

Else

Me!TabCtl0.Visible = False

End If
End Sub
 
R

Rick Brandt

Mark said:
Thanks Rick for your reply. I have a Tab control with 4 tabs on a
form. Each tab has a form attached to it that gets data from
underlying queries. I want the form to load with the Tab hidden.
When I click on the combo dropdown that is on the form I wan the Tab
to appear with all 4 tabs accessible. This code provides the ability
for the Tab to appear but the different pages on the tab won't let me
move from one to another.

I don't understand why that would be the case. As long as a TabPage is visible
you should be able to click on it and have that page move to the front. Are you
saying that when you do this nothing happens or do you get an error?
 
G

George Nicholson

Check to make sure that the Enabled property of each tab/page is not set to
False. It should be True.

HTH,
--
George Nicholson

Remove 'Junk' from return address.


Mark S via AccessMonster.com said:
Thanks Rick for your reply. I have a Tab control with 4 tabs on a form.
Each
tab has a form attached to it that gets data from underlying queries. I
want
the form to load with the Tab hidden. When I click on the combo dropdown
that
is on the form I wan the Tab to appear with all 4 tabs accessible. This
code
provides the ability for the Tab to appear but the different pages on the
tab
won't let me move from one to another.

Mark said:
I am try to hide a Tab control with underlying forms attached. When I
click
on a combo box on the main form I want this Tab control to become visible.
When I use the following code I am able to hide/unhide the Tab but not
able
to select the actual Tabs.

Any help is appreciated.

Private Sub Combobox_Click()
If [Combobox] Then

Me!TabCtl0.Visible = True

Else

Me!TabCtl0.Visible = False

End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top