Results 1 to 6 of 6
  1. #1
    Lesg is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Sep 2021
    Posts
    101

    Temp Table record locking error

    I have a form that allows for the editing of line items or an order to be edited/amended to add or remove items. This form has been working for years, yet today, I have found when I try and use the combo box to select products, I am getting this error:



    Run-Time error 3211

    The database engine could not lock table 'temppricecheck' because it is already in use by another person or process

    Click image for larger version. 

Name:	temp table locking error.JPG 
Views:	10 
Size:	49.5 KB 
ID:	47770

    Can anyone advise how I can see what's using the table? and why this would start to occur now?

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    So is there another user doing something on that table at that time? If not and it's only you, then something changed in the code, or an update to Access has caused code that worked before to not work as expected now. We've seen this happen when less than perfect code worked before but failed after an update. Or code was modified and now some action taken puts a lock on the table and subsequent code attempts to modify it independently. That has happened to me before. Suggest you step through and see what the sequence of code actions is.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    Lesg is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Sep 2021
    Posts
    101
    Its only me using this table, each install is unique to each user, so the temp table is local to them.

    Very strange this, as I have also found, the invoice print is not working, keeps popping up the parameter boxes for the invoice number, yet if I run the underlying query for the invoice data the query runs fine?

    ----------
    I found adding the parameter settings back again via the designer window has resolved the parameter issue for the invoices now ... which is weird!
    Last edited by Lesg; 05-10-2022 at 07:04 AM. Reason: found a fix to optional error

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    These things can be hard to find, but IMO your best bet is to see if you can repeatedly reproduce the error by doing exactly the same things. This means that if you open a form, do something, get the error, do that something again and don't get the error then that is not repeating the process because you didn't open the form the second time. However, that can be useful information as it suggests the problem is starting during form open. It is quite possible that something is beginning a record edit/append and subsequent actions being taken are trying to do the same thing before the first action is saved. This doesn't have to be user initiated. It can be via code, setting a field to some value and not causing a move off the record or not performing an Undo when it should - something like that. Stepping through the code as described is the way to go, IMO. Alternatively, copy, compact and zip your db and post with instructions on how to replicate the issue. You can remove sensitive data and all objects not relevant or do this. You would have to provide fe and be db's if the db is split.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    Lesg is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Sep 2021
    Posts
    101
    I Have resolved the problem by, for now, commending out the DoCmd OpenQuery, its been there for years, so will need to figure out why it was needed in the first place.... I am a bit confused right now

  6. #6
    Lesg is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Sep 2021
    Posts
    101
    Thanks for that, I have been going through those steps, but as you know, can be time consuming, I thought it might have been a windows update, but there has not been any changes since I last used the program, additionally, looking through my notes, it made no reference to using the edit form, so might be the case the problem was already there and never been reported or noticed by any users??

    Thanks again for the advice

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 9
    Last Post: 12-08-2021, 02:40 AM
  2. Replies: 2
    Last Post: 12-07-2021, 01:56 PM
  3. Replies: 3
    Last Post: 04-18-2018, 09:02 PM
  4. Replies: 1
    Last Post: 09-03-2014, 10:48 AM
  5. Replies: 3
    Last Post: 11-01-2013, 10:16 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums