Try this |
| sri sri replied to Timothy Purvis at 03-Jul-08 11:25 |
Hi, Try the below query to check the username and password in a single query
Call ConnectRS(CN, RS, "SELECT name,password FROM staff where name ='" & txtName.Text & "' and password='" & txtPwd.Text & "'")
If RS.RecordCount = 0 Then MsgBox "Invalid Username and Password entered", vbCritical txtPwd.Text = "" txtName.Text="" CN.Close Call ConnectDB(CN, App.Path & "\users.mdb") Exit Sub End If RS.Close
|
|