ANyways try this sunshine!
VB Code:
Private Sub cmdLogin_Click() Uname = txtUsername.Text Pword = txtPassword.Text Set db = OpenDatabase("C:\Windows\Desktop\users.mdb") MsgBox "got here" strSQL = "Select * FROM usertable Where usertable.[Username] =""" & Uname & """;" Set rs = db.OpenRecordset(strSQL, dbOpenDynaset) If rs.RecordCount = 0 Then MsgBox "No user by the name " & Uname & ". Please check the name you entered.", vbInformation: Exit Sub TestPass = rs!Password If TestPass = Pword Then MsgBox "Correct password!" rs.Close db.Close End Sub




Reply With Quote