If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Tabs visible, not visible on form load
Hello,
I have 3 different types of permission levels for my database, when a form loads i want only certain tabs to show up depending on the permission level, this is what i have so far which works strictly for "SUPER ADMIN", how do tell the form if the permission level ="MANAGER" to make 2 or 3 of the now hidden tabs visible again. Private Sub Form_Load() If Forms!SIGNIN.LOGINBACK_subform.Form.PERMISSION_LEV EL "SUPER ADMIN" Then Me.EMPLOYEES_TAB.Visible = False Me.PO_LOG.Visible = False Me.REPORTS.Visible = False Me.EMPLOYEES_TAB.Visible = False Me.INCEDENT_ACCIDENT_NVESTIGATION.Visible = False Me.INTERNAL_AUDITS.Visible = False End If End Sub Any help would be appreciated Ryan |
#2
|
|||
|
|||
Tabs visible, not visible on form load
Try:
Private Sub Form_Load() Select Case Forms!SIGNIN.LOGINBACK_subform.Form.PERMISSION_LEV EL Case Is "MANAGER" Me.EMPLOYEES_TAB.Visible = False Me.PO_LOG.Visible = False Me.REPORTS.Visible = False Me.EMPLOYEES_TAB.Visible = False Me.INCEDENT_ACCIDENT_NVESTIGATION.Visible = False Me.INTERNAL_AUDITS.Visible = False Case Is "SUPER ADMIN" Me.EMPLOYEES_TAB.Visible = True Me.PO_LOG.Visible = True Me.REPORTS.Visible = True Me.EMPLOYEES_TAB.Visible = True Me.INCEDENT_ACCIDENT_NVESTIGATION.Visible = True Me.INTERNAL_AUDITS.Visible = True Case Else End Select End Sub -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com "Ryis" wrote in message ... Hello, I have 3 different types of permission levels for my database, when a form loads i want only certain tabs to show up depending on the permission level, this is what i have so far which works strictly for "SUPER ADMIN", how do tell the form if the permission level ="MANAGER" to make 2 or 3 of the now hidden tabs visible again. Private Sub Form_Load() If Forms!SIGNIN.LOGINBACK_subform.Form.PERMISSION_LEV EL "SUPER ADMIN" Then Me.EMPLOYEES_TAB.Visible = False Me.PO_LOG.Visible = False Me.REPORTS.Visible = False Me.EMPLOYEES_TAB.Visible = False Me.INCEDENT_ACCIDENT_NVESTIGATION.Visible = False Me.INTERNAL_AUDITS.Visible = False End If End Sub Any help would be appreciated Ryan |
#3
|
|||
|
|||
Tabs visible, not visible on form load
You could use a Select Case statement, i.e.;
Private Sub Form_Load() Dim strPermLevel As String strPermLevel = Forms!SIGNIN.LOGINBACK_subform.Form!PERMISSION_LEV EL Select Case strPermLevel Case "PEON" Me.EMPLOYEES_TAB.Visible = False Me.PO_LOG.Visible = False Me.REPORTS.Visible = False Me.EMPLOYEES_TAB.Visible = False Me.INCEDENT_ACCIDENT_NVESTIGATION.Visible = False Me.INTERNAL_AUDITS.Visible = False Case "MANAGER" Me.EMPLOYEES_TAB.Visible = False Me.PO_LOG.Visible = False Me.REPORTS.Visible = True Me.EMPLOYEES_TAB.Visible = False Me.INCEDENT_ACCIDENT_NVESTIGATION.Visible = True Me.INTERNAL_AUDITS.Visible = True Case "SUPER ADMIN" Me.EMPLOYEES_TAB.Visible = True Me.PO_LOG.Visible = True Me.REPORTS.Visible = True Me.EMPLOYEES_TAB.Visible = True Me.INCEDENT_ACCIDENT_NVESTIGATION.Visible = True Me.INTERNAL_AUDITS.Visible = True End Select End Sub -- _________ Sean Bailey "Ryis" wrote: Hello, I have 3 different types of permission levels for my database, when a form loads i want only certain tabs to show up depending on the permission level, this is what i have so far which works strictly for "SUPER ADMIN", how do tell the form if the permission level ="MANAGER" to make 2 or 3 of the now hidden tabs visible again. Private Sub Form_Load() If Forms!SIGNIN.LOGINBACK_subform.Form.PERMISSION_LEV EL "SUPER ADMIN" Then Me.EMPLOYEES_TAB.Visible = False Me.PO_LOG.Visible = False Me.REPORTS.Visible = False Me.EMPLOYEES_TAB.Visible = False Me.INCEDENT_ACCIDENT_NVESTIGATION.Visible = False Me.INTERNAL_AUDITS.Visible = False End If End Sub Any help would be appreciated Ryan |
Thread Tools | |
Display Modes | |
|
|