Results 1 to 4 of 4
  1. #1
    francesco is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2012
    Posts
    3

    Update access table from a pass-through query

    Hi!
    I want update a table (in Access 2010) based on the results from a pass-through query that pulls data from an old Fox Pro database.
    With the following query I push data into my access table (everything works fine):
    Code:
    INSERT INTO Bolle ( esercizio, numero_documento, ...)
    SELECT Bolle_Arca.[esercizio], Bolle_Arca.[numero_documento], Bolle_Arca.[testata_codice], ...
    FROM Bolle_Arca
    WHERE 
    Bolle_Arca.[testata_codice] NOT IN (SELECT Bolle.testata_codice FROM Bolle)
    When I try to update the same table using the same pass-through query:
    Code:
    UPDATE Bolle INNER JOIN Bolle_Arca ON Bolle.riga_codice = Bolle_Arca.riga_codice 
    SET Bolle.esercizio = Bolle_Arca.esercizio
        , Bolle.numero_documento = Bolle_Arca.numero_documento, ...
    WHERE Bolle.spedito = False 
         and Bolle.data_invio_mail_spedito is null
         and (Bolle.tracking is null or Bolle.tracking = '')
         and Bolle.testata_codice = Bolle_Arca.testata_codice;
    I get this error: "Operation must use an updatable query"



    Any help would be greatly appreciated.

    Thanks

  2. #2
    tanvi is offline Competent Performer
    Windows XP Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    100
    This error occurs when you tried to run, open, or modify a query that is not updatable. To resolve this error first close the database, resolve the read-only condition, and then reopen it for read/write.

  3. #3
    francesco is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2012
    Posts
    3
    Ok, but there's no read-only condition! I can update and insert data into the access table "Bolle" by vba script with non problem!
    The pass-throgh query (Bolle_Arca) is a simple SELECT, but the update query doesn't write any data in "Bolle_Arca"...

  4. #4
    francesco is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2012
    Posts
    3
    Does anyone have any ideas about this problem?
    Thanks

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

Similar Threads

  1. Replies: 3
    Last Post: 06-29-2012, 01:31 AM
  2. Insert Pass-Through Results into Access Table with VB
    By raynman1972 in forum Programming
    Replies: 3
    Last Post: 06-20-2012, 08:43 PM
  3. Replies: 1
    Last Post: 02-08-2012, 04:58 PM
  4. Replies: 1
    Last Post: 02-08-2012, 04:50 PM
  5. Replies: 3
    Last Post: 12-28-2010, 12:42 PM

Tags for this Thread

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