Hi,
i have a text field in the table and the form. when the user put the username and password, i want to check both are entered correctly (the username and password are correct). i tried to do that but it seems since the password is showing *** it wont be able to compare it with the word field in the table so i will always get 0 records. how can i test the password field in both the form and table?
Code:
Dim dbs As DAO.Database
Dim rsSQL As DAO.Recordset
Dim test As Integer
username_1.SetFocus
theusername1 = username_1.Text
password_1.SetFocus
thepassword1 = password_1.Text
Set dbs = CurrentDb
strSQL = "SELECT username,userpassword FROM users_login where username = '" & theusername1 & "' and userpassword = '" & thepassword1 & "'"
Set rsSQL = dbs.OpenRecordset(strSQL)
If rsSQL.RecordCount = 1 Then
MsgBox "found"
Else
MsgBox "not found"
End If