Hi All,
I am trying to implement a user login by using a dlookup against a table called tblUser.
The concept is that if the password entered into the text box matches the password in the table WHERE the username matches the username in the table and the active yes/no field is true then it will let the user in, if not it will throw an error and ask the user to enter again.
My problem is that I am getting a type mismatch within my dlookup. This must be due to the yes/no field I have added into the criteria as it was working before I put this in.
Here's what I have:
Any help would be appreciated.
Thanks,
Foxy
I am trying to implement a user login by using a dlookup against a table called tblUser.
The concept is that if the password entered into the text box matches the password in the table WHERE the username matches the username in the table and the active yes/no field is true then it will let the user in, if not it will throw an error and ask the user to enter again.
My problem is that I am getting a type mismatch within my dlookup. This must be due to the yes/no field I have added into the criteria as it was working before I put this in.
Here's what I have:
Code:
If Me.txtPassword.Value = DLookup("[password]", "[tblUsers]", "[active] = -1 " And "[username]= " & "'" & Me.txtUsername.Value & "'") Then ... etc
Any help would be appreciated.
Thanks,
Foxy