Question : Hide Page

Using the code Helen offered, how do I hide a page in the tab control?

 
 

Answer : Hide Page

Here is code to loop through the pages and make each invisible (though why not just make the entire Tab control invisible?):
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
Public Sub ListPages()
'Created by Helen Feddema 9-Feb-2010
'Last modified by Helen Feddema 9-Feb-2010

On Error GoTo ErrorHandler

   Dim tbc As Access.TabControl
   Dim pge As Access.Page
   Dim strPage As String
   
   Set tbc = Forms![frmCompanyInfo]![tabInfo]
   
   For Each pge In tbc.Pages
     pge.Visible = False
   Next pge
   
ErrorHandlerExit:
   Exit Sub

ErrorHandler:
   MsgBox "Error No: " & Err.Number _
      & " in ListPages procedure" _
      & "; Description: " & Err.Description
   Resume ErrorHandlerExit

End Sub
Random Solutions  
 
programming4us programming4us