-
Swicthboard
I have my switchboard. On the main switchboard i have a button that only the supervisor needs to access how can i disable it by keying off current uer?
-
Try something like this.......in your Switchboard Form's Form_Load() Sub
1) Replace btnSupervisorOnly with your button object's name
2) You do not really need the string variable (sCurrentUser)
I just used it to show that it gets the Current User value from the CurrentUser function
3) MsgBox() call is for informational purposes only
MsgBox ("The current user is: " & CurrentUser)
Dim sCurrentUser As String
sCurrentUser = CurrentUser
If sCurrentUser = "Admin" Then
Me.btnSupervisorOnly.Enabled = True
Else
Me.btnSupervisorOnly.Enabled = False
End If
I hope this helps.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules