|HELP!!!!!! I have some code that checks to see if a users password is correct; if it is correct, I want the code after that to check a query to see what form to open based on the users permissions (1=Power User, 2=General User, 3=Casual User) which are directly tied to the username the person types in because of my "User ID" Table. I hope that makes sense, if it doesn't, ask a question and I can be more descriptive. Here is an example of the code I am trying to use. As you can see, I want my code to check if their permissions group is 1,2, or 3, then open the corrisponding form. Thanks!!!!!|
If Me.Text26.Value = DLookup("Password", "ADMIN User ID", _
"[ID]=" & Me.Combo24.Value) Then
lngMyEmpID = Me.Combo24.Value
'checks the permissions of the user logging in and brings back
'the proper form with the permissions they are allowed
If [Find Permissions of Logged In User]![PermissionsGroup] = "1" Then
DoCmd.OpenForm "Welcome Menu Screen"
If [Find Permissions of Logged In User]![PermissionsGroup] = "2" Then
DoCmd.OpenForm "Welcome Menu Screen General User"
If [Find Permissions of Logged In User]![PermissionsGroup] = "3" Then
DoCmd.OpenForm "Welcome Menu Screen casual user"
'Close logon form
DoCmd.Close acForm, "Logon Screen", acSaveNo
'command below will just hide the logon screen if i need to refer to the combobox
MsgBox "Password Invalid. Please Try Again", vbOKOnly, _