Results 1 to 6 of 6
  1. #1
    Lorlai is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jun 2011
    Posts
    107

    Could not lock Table error

    I have been getting the following error:

    Run-time error '3211':
    The database engine could not lock table 'Temp' because it is already in use by another person or process.

    I have tried closing the table through vba:

    Code:
    DoCmd.Close acTable, "Temp_WIP"
    But still get this error. I am not sure why this occurring. There are no forms that use this information, and no queries that utilize the temp file once the files have been appended to the master file. Is there a way to quickly and easily see all objects that are using the Temp file? Or does anyone have advice to figure out a way to end this error?

    Thank you for your help!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    You can try the Tables and Related view on the Navigation pane.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Lorlai is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jun 2011
    Posts
    107
    This confirms that nothing is associated with the table, the Temp table appears alone. Is there another way to look?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I use an add-in called Rick Fisher's Find and Replace to search database. Costs about $50. Saved my butt more than once.

    It is possible you have a corruption issue. Can you copy this table? Can you delete it?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Lorlai is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jun 2011
    Posts
    107
    I can copy and delete the table manually, but cannot do it through the code I placed in the first post. If it is a corruption issue, would recreating the database be the best option?

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Your code is to close, not copy or delete. You also tried code to copy/delete table?

    Sometimes just building a new object and deleting the old one resolves corruption. Sometimes have to create new db.

    Have you run Compact & Repair?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. The database could not lock table...
    By Dleader in forum Forms
    Replies: 1
    Last Post: 02-13-2013, 09:45 AM
  2. Lock table
    By Bdowns in forum Access
    Replies: 1
    Last Post: 03-15-2012, 10:26 PM
  3. access error 3050 could not lock file
    By donnan33 in forum Security
    Replies: 3
    Last Post: 02-08-2012, 06:37 PM
  4. Lock table contents?
    By Jaymond Flurrie in forum Access
    Replies: 1
    Last Post: 01-03-2012, 12:24 PM
  5. Replies: 11
    Last Post: 07-17-2011, 08:56 PM

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