?
Solved

Hide a specific page from Tab Control

Posted on 2009-12-16
3
Medium Priority
?
204 Views
Last Modified: 2012-06-27
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
0
Comment
Question by:joeserrone
  • 2
3 Comments
 
LVL 75
ID: 26065188
Sure ...

Me.tabTestPg2.Visible = False  ' or True

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

mx
0
 
LVL 39

Accepted Solution

by:
thenelson earned 2000 total points
ID: 26065206
In the open event put something like:
Private Sub Form_Open ()
If user =  "User" then
PageName.Visible = False
End If
End Sub
0
 
LVL 75
ID: 26065231


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
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question