• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 207
  • Last Modified:

Hide a specific page from Tab Control

Hello Everyone,
I have a form with a textbox called: "AccessLevel" this textbox indicates if the user is an Admin or User after they sign in. On the same form I have a Tab Control with several pages with different functions. Is there a way to place code so that if the user is signed in as a "User" a specific page for example "Reports" is invisible. If possible in which event should I place this code
  • 2
1 Solution
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
Sure ...

Me.tabTestPg2.Visible = False  ' or True

The code most likely would go in the Form OnLoad ... after you figure out admin rights.

In the open event put something like:
Private Sub Form_Open ()
If user =  "User" then
PageName.Visible = False
End If
End Sub
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:

Select Case Me.txtAccessLevel

    Case "User"
    Me.YourTabPage.Visible = False  ' or True
    Case "Admin"
        Me.YourTabPage.Visible = True ' or False
    Case "AndSoOn"
       '  do it again
End Select
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now