Results 1 to 9 of 9
  1. #1
    Join Date
    Sep 2005
    Posts
    220

    Unanswered: Can't figure out this error message

    I have a macro that basically queries from a linked table, and then creates a new table in Access. It used to run as expected then just yesterday I started getting this error:

    Run-time error '3211':

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


    How did this happen and how do I resolve it?

  2. #2
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    First thing I would do is get rid of the .ldb file.
    Make sure all your users are out of the database, then go to the
    same folder that the DB is in and look for the file with the same name
    as your db, but with a .ldb extension. Delete that file, then reopen the
    database. The lock should be resolved.
    Inspiration Through Fermentation

  3. #3
    Join Date
    Sep 2005
    Posts
    220
    No luck. I searched for the *.ldb and found nothing, but I still get the error.

  4. #4
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    ...you are looking for the .LDB on the linked machine, not the client?

    izy
    currently using SS 2008R2

  5. #5
    Join Date
    Apr 2004
    Location
    outside the rim
    Posts
    1,011
    Somebody, somewhere, has it open either in Exclusive, or more likely, in design view.

    tc

  6. #6
    Join Date
    Sep 2005
    Posts
    220
    This is a new app and nobody knows about it besides myself. I've closed the app, even went as far as rebooting and I still get the error.

  7. #7
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    Quote Originally Posted by ssmith001
    I have a macro that basically queries from a linked table, and then creates a new table in Access. It used to run as expected then just yesterday I started getting this error:

    Run-time error '3211':

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


    How did this happen and how do I resolve it?
    Ok, different approach...

    You are creating a table called 'tbl_PromoCode' from data in a linked table.
    Can I assume you deleting the previous version of the table before trying to add the new one? I'm not sure that would cause THIS error, but it's worth a shot.
    Inspiration Through Fermentation

  8. #8
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    What is the name of the table you are making? Are you making it with a Make Table query? At the time you are making it, is a form or report or query open that is based on the table?

    My guess is that you are trying to create a table with the same name as an existing table, so Access has to delete the current table and some other object is still using the old table.

  9. #9
    Join Date
    Apr 2004
    Location
    outside the rim
    Posts
    1,011
    I'm not sure that would cause THIS error, but it's worth a shot.
    Just for the record, as you'll see in many, many post here, the error system in Access pretty much sucks. Rarely does the error message actually pertain to or given even the slightest clue towards the actaul cause of the problem.

    Try the process without the step that creates the new table (change that query to a simple select query) and see if you get the error.

    If that runs ok, the problem is with the make table part. Change the name of the new table in your "create a table" query to something entirely different and try again.

    If that doesn't run ok, the problem is somewhere in the queries.

    Basic problem solving approaches: either start at the end and remove steps one at a time until the error goes away, or start at the first step and add one step at a time until the error occurs.

    good luck,
    tc

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •