mauricionava
Programmer
Hi, I have a login form that uses the following codes in the Login button:
and a table with two fields which are "userid" and "PWD". I would like to insert another field in this table to specify who in this list has access to some fields. For example a colunm called AUTH and having a YES or NO of whoever is authorized to use certian field.
How could I have that command in the Login button lookup and enable the fields if the user entered is YES authorized?
Thanks!
Code:
If Me.quserid.Value = "" Then
MsgBox "Please enter a username to continue."
Exit Sub
Else
If Me.qpwd.Value = "" Then
MsgBox "Please enter a password to continue."
Exit Sub
End If
End If
If Me.qpwd.Value = DLookup("PWD", "tblLogIn", "USERID = '" & Me.quserid.Value & "'") Then
DoCmd.OpenForm "frmMain22", acNormal
Else
MsgBox "Invalid Password. Please try again."
End If
and a table with two fields which are "userid" and "PWD". I would like to insert another field in this table to specify who in this list has access to some fields. For example a colunm called AUTH and having a YES or NO of whoever is authorized to use certian field.
How could I have that command in the Login button lookup and enable the fields if the user entered is YES authorized?
Thanks!