Hi,
I have cboUser for choosing username, txtpassword for password input and this code, wich verify if the password is correct for selected user:
'Check value of password in tblUsers to see if this matches value chosen in combo box
If Me.txtpassword.Value = DLookup("Password", "tblUsers", "[lngEmpID]=" & Me.cboUser.Value) Then
lngMyEmpID = Me.cboUser.Value
'Things to do....
My question is: can this code be modify to verify also, if the user is an admin user or a simple user (I have this contained in tblUser's table UserType field), and if it is User open Form1, if it is Admin open Form2?
Any help apreciated.
Attila
I have cboUser for choosing username, txtpassword for password input and this code, wich verify if the password is correct for selected user:
'Check value of password in tblUsers to see if this matches value chosen in combo box
If Me.txtpassword.Value = DLookup("Password", "tblUsers", "[lngEmpID]=" & Me.cboUser.Value) Then
lngMyEmpID = Me.cboUser.Value
'Things to do....
My question is: can this code be modify to verify also, if the user is an admin user or a simple user (I have this contained in tblUser's table UserType field), and if it is User open Form1, if it is Admin open Form2?
Any help apreciated.
Attila