Hide the tab on a subform?

D

DJW

I have a three subforms. The following visual basic code works in hiding
the various parts of one of the subforms. This code is an event that takes
place "after click".

Me.TabCtl33.Visible = False 'Hides all three subforms.
Me.subfrm_Victim.Visible = False 'Hides all objects on a single page but
page tab is still visible on the subform.
'Me.subfrm_Victim.Form.[Text40].Visible = False 'Hides a single control
on the subform.

My problem/question is... what code can I use to hide the tab at the top of
the subform?
 
G

Graham Mandeno

Hi DJW

Try one of these:
Me.TabPageName.Visible = False
where TabPageName is the name of the tab page on the tab control

or:
Me TabCtl33(3).Visible = False
where 3 is the page index of the page on the tab control.

BTW you can rename TabCtl33 to something more meaningful if you like ;-)
 

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