Resume Next Question - Dup Record in Database Table
Posted on 2006-11-21
Hello all. I have some VB code that loops through and inserts records into an access table. I get to a record that already exists in my table and access throws a error change could not be inserted because of dup key. Then VB throws a file already open error on the .Update line of the below code. Should I just do a Resume Next or something? I dont want to check the DB everytime with a select statement. Any ideas?
With dbAccessDb.OpenRecordset("tblCustomer", dbOpenDynaset)
.Fields!Acct = Acct
.Fields!Cust = Cust