Restricting data based on User

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have setup filters that determine what data a user can use based on their logon id, which is entered in a startup form. However, I can't get the code to work properly on the logon form. Here's the current code:

Private Sub XID_Enter()

If (Eval("Forms!frmLogon!frmAuthorized!Authorized = ""yes"" ")) Then
Me.Visible = False
DoCmd.OpenForm "Switchboard", acNormal, "", "", , acNormal
'DoCmd.Close acForm, frmlogon

Else
MsgBox "You are not authorized for this application", vbExclamation, ""
DoCmd.Quit
'application.Quit acExit
End If

End Sub

Any ideas would be greatly appreciated.
 
Private Sub XID_Enter()

If Forms!frmLogon!frmAuthorized!Authorized = "yes" Then

DoCmd.OpenForm "Switchboard", acNormal
DoCmd.Close acForm, frmlogon

Else
MsgBox "You are not authorized for this application",
vbOkOnly+vbExclamation
DoCmd.Quit
'application.Quit acExit
End If

End Sub
-----Original Message-----
I have setup filters that determine what data a user can
use based on their logon id, which is entered in a startup
form. However, I can't get the code to work properly on
the logon form. Here's the current code:
 
Back
Top