Rx_
Nothing In Moderation
- Local time
- Today, 14:21
- Joined
- Oct 22, 2009
- Messages
- 2,803
This is working for me in a Citrix distribution environment.
If there are other suggestions or improvements, please contribute.
Users have toolbar hidden. As a developer, the toolbar shows up.
In the Start Up form
Private Sub Form_Load()
20 On Error Resume Next
30 If IsDeveloper() Then
40 DoCmd.ShowToolbar "Ribbon", acToolbarYes
50 Else
60 DoCmd.ShowToolbar "Ribbon", acToolbarNo ' hide Ribbon
70 End If
'MsgBox "is developer is " & IsDeveloper, vbOKOnly, "Test Messagebox to evaluate hidden toolbar"
'DoCmd.Maximize
100 DoCmd.Restore ' keeps startup form from Maximizing
End Sub
If there are other suggestions or improvements, please contribute.
Users have toolbar hidden. As a developer, the toolbar shows up.
Code:
Function IsDeveloper() As Boolean
10 On Error Resume Next ' in general module
20 Dim UserName As String
30 IsDeveloper = False
40 UserName = VBA.Environ("UserName")
50 Select Case UserName
Case "TheOldProgrammer" ' Your LAN ID Goes Here
60 IsDeveloper = True
70 Case Else
80 IsDeveloper = False
90 End Select
End Function
Private Sub Form_Load()
20 On Error Resume Next
30 If IsDeveloper() Then
40 DoCmd.ShowToolbar "Ribbon", acToolbarYes
50 Else
60 DoCmd.ShowToolbar "Ribbon", acToolbarNo ' hide Ribbon
70 End If
'MsgBox "is developer is " & IsDeveloper, vbOKOnly, "Test Messagebox to evaluate hidden toolbar"
'DoCmd.Maximize
100 DoCmd.Restore ' keeps startup form from Maximizing
End Sub