ACC97: Disabled Tab Control Page Remains VisibleLast reviewed: July 21, 1997Article ID: Q161011 |
The information in this article applies to:
SYMPTOMSModerate: Requires basic macro, coding, and interoperability skills. When the Enabled property of a page on a Tab control is set to False, you can still click the tab and see its controls and the data they contain. However, you cannot change any of the data.
RESOLUTIONThere are two methods you can use to hide the data on a disabled Tab control page.
Method 1Set the Visible property of the Tab control page to False in the Load event of the form. This makes the Tab control page and its tab invisible. Add the following procedure to the Load event of the form, substituting the name of your own Tab control:
Private Sub Form_Load() If Me!TabCtl0.Pages(1).Enabled = False Then Me!TabCtl0.Pages(1).Visible = False End If End Sub Method 2Set the Visible properties of the controls on the Tab control page to False in the Load event of the form. This hides the controls on that page, but allows the tab to remain visible. Add the following procedure to the Load event of the form, substituting the name of your own Tab control and page controls:
Private Sub Form_Load() If Me!Tabctl0.Pages(1).Enabled = False Then Me!TabCtl0.Pages(1).Controls![HireDate].Visible = False Me!TabCtl0.Pages(1).Controls![ReportsTo].Visible = False End If End Sub STATUSThis behavior is by design.
MORE INFORMATION
Steps to Reproduce Behavior
REFERENCESFor more information about the tab control, search the Help Index for "tab controls."
|
Additional query words: grey gray dim
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |