all. I have a form with buttons to access forms. I don't want a certain group of users to access this form. I have a login form with user name password and dept. Upon successful password; the user can access the switchboard which has three buttons to gain access to another form. I tried using a dlookup:
Code:
Dim strDept As String
If strDept = DLookup("strEmpName", "tblUsers", "strDept="HR" )Then
msgbox "you don't have access"
Besides the problem that this code doesn't work; the login form is closed by the time the user clicks the button. This is why i didn't reference the form (Forms!frmLogon!cboEmployee) in the code.
Help please
Thanks