Ok, I have searched and searched for the answer to my issue and I can't find a previous thread that will help....
My code is not working...
I created a login form for my Access 2007 db which requires each user to login. Once they are logged in, I want them to have access to certain forms based on the 'Privilege' I have assigned to each user.
The Analysts table contains the user login information as well as the assigned 'Privilege'.
Privileges: FSSTechnician and FSSManager
FSSTechnician is not allowed to access form - FSSManagers, but FSSManager is allowed to access this form.
Here is my code:
Private Sub FSS_Manager_Click()
Dim Privilege As String
Username = DLookup("[Privilege]", "Analysts")
If "[Privilege]" = "FSSManager" Then
DoCmd.OpenForm "FSSManagers", acNormal, , "[Privilege]='FSSManager'"
Else
MsgBox "You do not have access to this area.", vbCritical
End If
End Sub
What am I doing wrong?
Thanks!
My code is not working...
I created a login form for my Access 2007 db which requires each user to login. Once they are logged in, I want them to have access to certain forms based on the 'Privilege' I have assigned to each user.
The Analysts table contains the user login information as well as the assigned 'Privilege'.
Privileges: FSSTechnician and FSSManager
FSSTechnician is not allowed to access form - FSSManagers, but FSSManager is allowed to access this form.
Here is my code:
Private Sub FSS_Manager_Click()
Dim Privilege As String
Username = DLookup("[Privilege]", "Analysts")
If "[Privilege]" = "FSSManager" Then
DoCmd.OpenForm "FSSManagers", acNormal, , "[Privilege]='FSSManager'"
Else
MsgBox "You do not have access to this area.", vbCritical
End If
End Sub
What am I doing wrong?
Thanks!