Results 1 to 4 of 4
  1. #1
    darthkiro is offline Novice
    Windows 10 Office 365
    Join Date
    Mar 2023
    Posts
    1

    Update query criteria only if text is different


    Just a heads up, I am fairly new to using Access. I am using a linked table (xlsx) to make updates to a tracker table. One field (column) [MigrationStatus] already has text in the tracker table and I need it to update only if the text in the linked table is different. Can anyone advise what I would need entered for the Criteria?

  2. #2
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    Try xlsx.MigrationStatus<>tblTracker.MigrationTracker

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  3. #3
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,933
    Where table.migration status not = linkedtable.migrationStatus

    You would also need to link on a common unique key between them.
    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

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    I would probably just update the field with the value. If the existing field is different it will update. If not, it will stay the same.
    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. Update Query with Criteria in update to table
    By tanner.morgan in forum Queries
    Replies: 3
    Last Post: 08-28-2018, 07:56 AM
  2. Replies: 2
    Last Post: 08-03-2017, 04:58 AM
  3. Replies: 4
    Last Post: 04-27-2016, 04:36 PM
  4. Replies: 2
    Last Post: 07-09-2014, 12:43 PM
  5. Replies: 7
    Last Post: 08-26-2013, 06:05 AM

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