In VBA you can test:
Dim count As Long
count = DCount("*", "tblUser", "UserName='" & Replace(Me!txtUser,"'","''") & _
"' AND Password='" & Replace(Me!txtPwd, "'", "''") & "'")
If count > 0 Then
'User exists and password is correct.
Else
'Either the user or the password or both are wrong.
End If
The replace functions make sure that single quotes ('
) that are part of the user input are escaped correctly. In SQL single quotes are used to delimit strings and a quote within the text can be escaped with two consequtive quotes.
As an example, the where condition could be:
UserName='Joe''s friend' AND Password='secret'