Hi,
I have the following section of code:
rst2.MoveFirst
Do While Not rst2.EOF
If rst2![Door_Part_Number] = Forms![Parts database for editting records - duplicate only]![Door Part Number] Then
If rst2![Extra_Code] = "NEW" Then
With rst2
.Edit
![Extra_Code] = str_ExtraCode
.Update
End With
End If
End If
rst2.MoveNext
Loop
When this code is run, at the edit stage I get the following error:
"Could not update; currently locked by another session on this machine"
I can't see that I have rst2 - the recordset of tbl_Doors&Extras opened anywhere else and not closed it.
If anyone has any ideas on why this error is occuring and how to solve it I would be most grateful.
I don't have rst1 also declared as the recordset of tbl_Doors&Extras for example.
Thanks in advance
John
I have the following section of code:
rst2.MoveFirst
Do While Not rst2.EOF
If rst2![Door_Part_Number] = Forms![Parts database for editting records - duplicate only]![Door Part Number] Then
If rst2![Extra_Code] = "NEW" Then
With rst2
.Edit
![Extra_Code] = str_ExtraCode
.Update
End With
End If
End If
rst2.MoveNext
Loop
When this code is run, at the edit stage I get the following error:
"Could not update; currently locked by another session on this machine"
I can't see that I have rst2 - the recordset of tbl_Doors&Extras opened anywhere else and not closed it.
If anyone has any ideas on why this error is occuring and how to solve it I would be most grateful.
I don't have rst1 also declared as the recordset of tbl_Doors&Extras for example.
Thanks in advance
John