Error 3188 "Couldn't update. Currently locked by another session on this machine"

  • Thread starter Thread starter rodalsa
  • Start date Start date
R

rodalsa

Guest
Error 3188 "Couldn't update. Currently locked by another session on this machine"

Access Version 7.0. Yes, its old but so am I. :bow: I'm guessing that the version won't make a difference. This is NOT a multiple user environment. The program is loaded in a single user environment.

My main form has several text boxes and combo boxes. The text boxes are bound to fields in the underlying table that the form is bound to. The combo boxes are unbound and I use VBA to handle their response to the users requests.

The form's record source is tblItems and txtDescription's control source is Description (a field in tblItems). rstItems is Public and based on tblItems. rstItems is Set in the Sub frmItems_Load.
This sub is accessed one time only prior to the activation of error 3188.

The Problem... txtDescription contains the value "United States Of America". I change this to "United States Of Americ" (backspacing over the terminal 'a'). Several Subs later at a rstItems.Edit code line, error 3188 raises it ugly head. :thumbdn: By stopping the code in txtDescription_Change and using the Immediate pane of the debug screen, I have determined by entering 'rstItems.Edit' the error has already be enabled. I get the error immediately after dropping the 'a'. :confused:

All instances of rstItems.Edit have the following construction....

rstItems.Edit
rstItems.variable = assignment variable
rstItems.Update

Additionally the error occurs without the program changing modules. All of it occurs in the Form_frmItems: Module.

From this I cannot see how any other process in my instance of Access or my programming could be locking the records.

In words... the simple act of removing the last character of the value of txtDescription has enabled an error condition on rstItems. Immediately before the removal of this character the error condition does not exist since other user manipulations of the form also access the same Sub and rstItems.Edit statement without problems.

What am I up against here? Is this a bug in Access? The error appeared late in the development process. There was a time when it was not there. That means that I must have done something to cause it but I cannot isolate it. There are no compile errors. Just this runtime error.
 
I hope someone has a solution to this Post as I have the same message appearing when I try to update a memo field on a record. It is isolated to one record.
 
I have not been back here for a while. I'm overwhelmed by spouse's medicals.

I found the answer to my problem. Maybe its your answer also.

When Access takes care of business by automatically updating bound controls, it becomes a "user". If, for whatever reasons, you attempt to update the record(s) Access has locked for its own use, good ole 3188 rears its ugly head.

Do your *.Edit etc. commands in the *_AfterUpdate event or later in the event cascade.

I also have a strong suspicion that I was not too smart when I called Access event subs from other event subs.

Hope this helps
 

Users who are viewing this thread

Back
Top Bottom