Results 1 to 3 of 3
  1. #1
    kspabo is offline Novice
    Windows 8 Access 2013
    Join Date
    Jun 2014
    Posts
    22

    List Box causing "The database engine could not lock table..."

    I've added a list box to my form that displays a table. This table is completely independent and gains it's data from an Append query. There is also a Delete query, which clears the table for a new set of data, and an Alter query which resets an AutoNumber column in the table (so that new data sets always start numbered at 1).



    Here's the problem: Since I've added the listbox and set the RowSource to the table, whenever I run the Append query I receive the error: "The database engine could not lock table 'tblLineSheet' because it is already in use by another person or process." I've made sure to close the table, but to no avail I still get this error. Without the List Box I don't encounter this error.




  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    It might be easier for readers if you would give a 3-4 line desceiption of what exactly you are trying to accomplish in plain English.
    We know nothing of your database nor business problem. Without some context readers can only guess at what you are doing/expecting.

    As a start it seems you are mis-using the autonumber. It also seems you are using the same table for the Forms recordSource and the listbox's Rowsource????

    For clarity:

    Data is stored in tables.
    Forms act like a window on to the data stored in the table. You can rearrange, format, ignore the data (stored in a table) that you choose to associate with a form.

  3. #3
    kspabo is offline Novice
    Windows 8 Access 2013
    Join Date
    Jun 2014
    Posts
    22
    Sorry about the lack of clarity, I'll try to do a better job of identifying what my goal is.

    I'm trying to create a form that has buttons that: 1. Adds a row of data to a table 2. Resets the autonumber column and deletes all the data on that table 3. Exports this table to a .csv
    These 3 buttons reside on this form, with a combobox that selects the data I want to be recorded to the table, and a list box which displays the data I've recorded to this table. The reason I want the AutoNumber column to be reset is because each set of data needs to be numbered, starting at 1 always.

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

Similar Threads

  1. Replies: 1
    Last Post: 06-27-2014, 10:51 AM
  2. table field name "Year" causing Argument Not Optional
    By JosmithTwo in forum Programming
    Replies: 2
    Last Post: 09-26-2012, 08:01 PM
  3. Replies: 11
    Last Post: 03-29-2012, 02:32 PM
  4. StrComp causing "Invalid use of Null" error
    By sephiroth2906 in forum Programming
    Replies: 5
    Last Post: 09-15-2011, 07:06 PM
  5. Database engine could not lock table issue
    By ganeshvenkatram in forum Access
    Replies: 2
    Last Post: 06-28-2011, 11:41 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