Results 1 to 5 of 5
  1. #1
    Darth_VBA is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jan 2021
    Location
    Japan
    Posts
    2

    Is it possible to append only a few selected cells of a a few selected records?


    This is racking my brain and I can't seem to find the answer from earlier posts.

    I created a "find unmatched" query, built to show me that a status (Avail_ID) has changed from my data source.

    I then want MS Access to only update the records and the specific unmatched cell on my DB table.

    The SQL for the find unmatched query is:

    SELECT qryvsbwithkey.Key, qryvsbwithkey.[Avail ID]
    FROM qryvsbwithkey INNER JOIN BAWP ON qryvsbwithkey.[Key] = BAWP.[Key]
    WHERE (((qryvsbwithkey.[Avail ID])<>[BAWP]![Avail_ID]));

    Is there a way to now change this query into an append query that will change [BAWP]![Avail_ID] to the value in qryvsbwithkey.[Avail ID], for only the results of the above query?

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    I'd just create a select query using your unmatched as the source. Then change that to an append query, all within the query designer?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    I then want MS Access to only update the records
    You don't change data by appending - you update. An update query using the unmatched query as the source?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    Darth_VBA is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jan 2021
    Location
    Japan
    Posts
    2
    Thank you all for your replies.

    I realize now I wanted to update, and not append.

    After some fumbling around, I ended up figuring out the sequence.

    UPDATE BAWP INNER JOIN qryvsbwithkey ON BAWP.[Key] = qryvsbwithkey.[Key] SET BAWP.Avail_ID = qryvsbwithkey.[Avail ID]
    WHERE (((qryvsbwithkey.[Avail ID])<>[BAWP].[Avail_ID]));

  5. #5
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    Best part is that you figured it out!
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 4
    Last Post: 07-27-2016, 12:07 PM
  2. Replies: 3
    Last Post: 01-24-2013, 02:38 PM
  3. Replies: 7
    Last Post: 07-14-2012, 01:02 AM
  4. Import Specific cells from Excel based on selected file.
    By Only4Access in forum Programming
    Replies: 5
    Last Post: 02-29-2012, 02:32 AM
  5. Replies: 1
    Last Post: 08-17-2010, 02: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