Quote Originally Posted by killua14 View Post
yes thats true.. but if ididnt return any result, isnt it must go to the else then open form1?? because it is in if clause
Code:
 
If Text1.Text = rs.Fields("Rfid") Then
Will always return an error when there are no records in your recordset. Basically you are trying to compare the value in text1 to something that does not exist and that results in an error.

You must either check the BOF EOF status first or check the recordcount property. You can only read the fields of the RS when there is a valid record currently selected.