Results 1 to 6 of 6
  1. #1
    crispy-bacon is offline Novice
    Windows XP Access 2003
    Join Date
    May 2011
    Posts
    13

    Updating table data while in use

    On one of my forms there is currently a listbox that is populated by a Query that uses multiple other tables/queries.

    I have been running into a problem where I try to update one of the tables (using a button on the form) by running a "Make table" query that will delete the table and repopulate it with the new values. This does not work as i get the message:

    "The database engine could not lick table 'tableName' because it is already in use by another person or process."

    I figure this is because the listbox/query is using the data in the table. So my question is will an "Update" query return the same problem and if so is there a way around this error (to edit the data in the table while the listbox is using it)?



    Thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    UPDATE or INSERT should not be issue. If you want the listbox to show the new values then requery the listbox.
    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
    crispy-bacon is offline Novice
    Windows XP Access 2003
    Join Date
    May 2011
    Posts
    13
    Okay thanks for the quick response, so from that in theory the following should work:

    Update all fields/records to 0 (clearing the table) then INSERT INTO from a query to fill my table with values, then requery the listbox.

    I feel like there is probably a better way to do this but oh well.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Actually, if what you want is an empty table then DELETE FROM tablename should work. UPDATE will leave a bunch of records with 0 in every field. Then the INSERT will append more records an addition to all those 0 records.
    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
    crispy-bacon is offline Novice
    Windows XP Access 2003
    Join Date
    May 2011
    Posts
    13
    Perfect thanks, yeah didn't think of that. I'll try it out and post the results.

    Thanks for your help

  6. #6
    crispy-bacon is offline Novice
    Windows XP Access 2003
    Join Date
    May 2011
    Posts
    13
    Yep everything worked perfectly, thanks a lot.

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

Similar Threads

  1. Replies: 0
    Last Post: 03-27-2011, 02:05 PM
  2. Replies: 1
    Last Post: 11-05-2010, 04:51 AM
  3. Updating Table Data Automatically
    By aquarius in forum Import/Export Data
    Replies: 6
    Last Post: 09-16-2010, 03:07 PM
  4. Importing and updating data.
    By mikej2009 in forum Import/Export Data
    Replies: 1
    Last Post: 05-23-2010, 11:30 AM
  5. Updating data within a form/table.....
    By softspoken in forum Forms
    Replies: 3
    Last Post: 04-15-2010, 06:33 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