i done the following code but it dosent show the records in the textboxes when found.

VB Code:
  1. Private Sub Command2_Click()
  2. With RS
  3. CN.Execute "Select * FROM users WHERE uname ='" & Text1.Text & "'"
  4.         .Fields("uname") = txtUser.Text
  5.         .Fields("pass") = txtPass.Text
  6.         .Requery
  7.        
  8.     End With
  9. End Sub