VB6 run time error 3218
Posted on 2000-02-29
I have a project coded in VB6 that issues a Run time error upon executing the recordset.update method:
3218, Couldn't update; currently locked
I know that the record isn't locked, nor is any other record or table. Here's part of the code:
rstIngred is the MS Access table that is getting thousands of records added to it so this code resides inside a loop.
rstIngred!Formula = NewFormCode
rstIngred!Line_No = Ingrs
rstIngred!Instruct = False
rstIngred.Update '<=ERRORS OUT HERE
When I trap the error with On Error Goto and then Resume, I notice that it pauses from time to time then continues where it would otherwise probably error out (remember, this is adding thousands of records) but then, before it is done, the entire program locks up hard. Taking some previous advice. I also tried placing a 'DoEvents' inside the loop but it doesn't help.
Any help would be appreciated