I get that message a lot when I am updating thousands of records at a time. Is this when you are getting it? Is there a way you can do the updates with SQL?
Otherwise, here is some code that I have written to side step the error. I noticed that when I get the message, if I debug and then run the code (without making any changes) the code would continue unitl it finished or errored again. So it seems to be a timing problem (a number of edits are being done but not written). So the code I have catches the error pauses for a couple of seconds and then continues. Here it is:
'If file lock exceeded error pause for a second then resume
If Err.Number = 3052 Then
MsgBox "Error " & Err.Number & " - " & Err.Description, vbInformation + vbOKOnly, "Error Initializing"
Here is the Pause routine:
Public Sub Pause(sinSeconds As Single)
'Description : This procedure will 'pause' execution of the program for the specified number of
'Parameters : lngSeconds Number of seconds to pause, can be a fraction.
'Return : None.
' 08/18/03 Original procedure.
' 03/13/06 Adjusted for midnight
Dim sinStartTime As Single
Dim sinFinishTime As Single
Dim lngCount As Long
'Get the current number of seconds since the beginning of the day
sinStartTime = Timer
sinFinishTime = sinStartTime + sinSeconds
'Adjust for midnight
If sinFinishTime > 86400 Then sinFinishTime = sinFinishTime - 86400
Do Until Timer > sinFinishTime
lngCount = 0