Results 1 to 3 of 3

Thread: Cannot lock table error!

  1. #1
    Join Date
    Feb 2004
    Location
    Hamilton, Ontario
    Posts
    9

    Cannot lock table error!

    HELP!

    I'm trying to take information a user enters into a form and insert it into a table as a new record. This is what I'm trying but I get a error, "The database engine could not lock table "tempPartId" because it is in use by another person or process. This is my code...

    INSERT INTO inventory ( [date], [user], partId, taken )
    VALUES (([Forms]![Taken]![Date]), ([Forms]![Taken]![Combo3]), ([Forms]![Taken]![Combo11]), ([Forms]![Taken]![Text14]));

    The, "([Forms]![Taken]![Combo11]" gets it's value from a Table called, "tempPartId". The values for the table are created everytime a user runs the query before they submit this form. I tried using a close macro to close it but I still get this error. HELP!

    Thanks,

    Eric Madej

  2. #2
    Join Date
    Jan 2003
    Location
    UK
    Posts
    277
    you might want to have a look at optimistic locking.

    Can you post a bit more of your code to give a clearer picture of what is going on. i.e. how and where are you doing the INSERT

  3. #3
    Join Date
    Feb 2004
    Location
    Hamilton, Ontario
    Posts
    9

    Attached database

    Here is the database to give you a better idea of what I'm talking about. The problem occurs in the Taken form.
    Attached Files Attached Files

Posting Permissions

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