J
JAdams
I am not sure what is wring with my code. The code is to set permissions based on user type.
Sub Permissions()
Dim usr, grp
usr = Me.user
grp = DLookup("[Type]", "Users", "[UserName] = " & "'" & usr & "'")
DoCmd.Close
DoCmd.OpenForm "mnuMenu"
Forms!frmIntegrity!txtUser = usr
Forms!frmIntegrity!txtType = grp
If grp = "Admin" Then
Forms!mnuMenucmdAddUser.active = True
ElseIf grp = "User" Then
Forms!mnuMenu!cmdAddUser.active = False
End If
End Sub
Thanks in advance!
Sub Permissions()
Dim usr, grp
usr = Me.user
grp = DLookup("[Type]", "Users", "[UserName] = " & "'" & usr & "'")
DoCmd.Close
DoCmd.OpenForm "mnuMenu"
Forms!frmIntegrity!txtUser = usr
Forms!frmIntegrity!txtType = grp
If grp = "Admin" Then
Forms!mnuMenucmdAddUser.active = True
ElseIf grp = "User" Then
Forms!mnuMenu!cmdAddUser.active = False
End If
End Sub
Thanks in advance!