My code looks like this:
Dim db As Connection
Dim RS2 As Recordset
Set db = New Connection
db.CursorLocation = adUseClient
db.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=C:\SESCOgx80\Databasebk\GX_DATA.MDB;"
Set RS2 = New Recordset
RS2.CursorType = adOpenKeyset
RS2.Open "select * from INSPECT Order by InsDOI DESC", db, , adLockOptimistic
DBEngine.Idle dbFreeLocks
RS2.AddNew
iRecCnt = RS2.RecordCount
For iCnt = 1 To iRecCnt - 1
RS2.Fields(iCnt).Value = RSPrimary.Fields(iCnt)
Next
RS2.Update
When this code runs I get the error:
"Run-time error '-2147217887(80040e21)'"
"Multiple-step operation generated errors. Check each status value."
The code will allow only two fields to be added to the buffer before the above error occurs.
If I bypass the error and go to RS2.Update it does create the new record with the two fields.
Anybody got any ideas. It would be much appreciated!