P
Peter Hibbs
Access 2003
I am running the code below :-
Dim rst As Recordset
Set rst = CurrentDb.OpenRecordset("tblProducts", dbOpenDynaset)
Do Until rst.EOF rst.Edit
rst!Surcharge = txtSurcharge
.... some other fields updated here
rst.Update
rst.MoveNext
Loop
....
On the rst.Edit line I get the error :-
Run time error 3052.
File sharing lock count exceeded. Increase MaxLocksPerFile registry
entry.
This happens after 9109 iterations. The table tblProducts has 19234
records so it is a bit inconvenient if the user wants to update more
than 9000 records.
The MaxLocksPerFile value on my PC is set to 0x0000251c (9500) but I
really don't want to have to change that value as this DB will be used
by several companies that I don't have direct contact with.
Also, I don't want to have to use an Update query to make the changes
as the VBA code (not shown here) allows the user numerous options to
change/update various fields which would be difficult to manage in
SQL.
Anyone have any ideas on a fix for the problem.
Peter Hibbs.
I am running the code below :-
Dim rst As Recordset
Set rst = CurrentDb.OpenRecordset("tblProducts", dbOpenDynaset)
Do Until rst.EOF rst.Edit
rst!Surcharge = txtSurcharge
.... some other fields updated here
rst.Update
rst.MoveNext
Loop
....
On the rst.Edit line I get the error :-
Run time error 3052.
File sharing lock count exceeded. Increase MaxLocksPerFile registry
entry.
This happens after 9109 iterations. The table tblProducts has 19234
records so it is a bit inconvenient if the user wants to update more
than 9000 records.
The MaxLocksPerFile value on my PC is set to 0x0000251c (9500) but I
really don't want to have to change that value as this DB will be used
by several companies that I don't have direct contact with.
Also, I don't want to have to use an Update query to make the changes
as the VBA code (not shown here) allows the user numerous options to
change/update various fields which would be difficult to manage in
SQL.
Anyone have any ideas on a fix for the problem.
Peter Hibbs.