I want to insert data into the database(MS Access). While inserting I want to check whether the data to be inserted is already there in the database. If it is there then the data should not be inserted. I tried doing if rs.eof= true then rs.addnew. I am getting error in rs.addnew. The error is the operation requested cannot be performed. I think it is because the record pointer is pointing to the EOF. If I give rs.movelast I get the error recordset cannot move backwards.

I would like to know how this problem can be solved.

Thanks in anticipation,