mistyinca1970
Member
- Local time
- Today, 10:21
- Joined
- Mar 17, 2021
- Messages
- 117
I have created some user access IDs and I have a login form that transfers the user's access ID into a TempVars.
Here's my issue. I'm using a Navigation form, and I have an Admin tab that only I will have access to. I know the "If" part of my On Load event is working because when I log in as someone without access, it pops up the message box, but after clicking OK it opens the form anyway. I'm suspecting it has something to do with being in the navigation form. Here is the On load code for this form:
Here's my issue. I'm using a Navigation form, and I have an Admin tab that only I will have access to. I know the "If" part of my On Load event is working because when I log in as someone without access, it pops up the message box, but after clicking OK it opens the form anyway. I'm suspecting it has something to do with being in the navigation form. Here is the On load code for this form:
Code:
Private Sub Form_Load()
If Globals.UserAccess(Me.Name) = False Then
MsgBox "You do not have the required permissions to access this tab."
DoCmd.Close acForm, Me.Name
End If
End Sub