Results 1 to 3 of 3
  1. #1
    warrensalsa is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Oct 2015
    Posts
    3

    Best method to compare 2 tables and highlight field differences

    I am new to MS_Access and am therefore looking for 2 pieces of advice on the below. The first is; what is the best design/methodology to use for what I want to do, and then second I need some step by step advice on how to achieve this.

    I have 2 tables:

    TabClient1
    ID Name RGEnum tduop
    1234 Homer 0987652 sdfd
    1235 Homer 7652316 rthh
    1236 Homer P234777 ruiu
    1781 Madge GHJ887 ghjk
    1782 Madge KLL909 ghjr

    TabClient2
    ID Name RGEnum post
    1234 Homer 0987652 12DDE
    1235 Gomer 7652316 67JGH
    1236 Homer P234887 909UI
    1781 Madge GHJ887 097HGT


    1782 Madge KLL909 99OPO

    Essentially I want to compare the two table and produce a comparison table with all entries, but highlighting the differences somehow eg in this example the names 'Homer' and 'Gomer' are different, as are 2 of the RGEnums.

    I want something like this in the end:
    ID NameTab1 NameTab2 RGEnumTab1 RGEnumTab2 tduop post
    1234 Homer Homer 0987652 0987652 sdfd 12DDE
    1235 Homer Gomer 7652316 7652316 rthh 67JGH
    1236 Homer Homer P234777 P234887 ruiu 909UI
    1781 Madge Madge GHJ887 GHJ887 ghjk 097HGT
    1782 Madge Madge KLL909 KLL909 ghjr 99OPO

    I have no idea what is the best way to do this so all help is greatly appreciated.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    These tables have a 1 to 1 relationship?

    Build a query that joins the records on the common ID fields. Use this query as the RecordSource for a form or report. Use textbox Conditional Formatting to 'highlight' differences.
    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
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    You can use Conditional Formatting on your Report to do that.
    See: https://support.office.com/en-us/art...5-44e43b05e22f

    EDIT: Looks like June beat me to the punch here!

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

Similar Threads

  1. compare field data in two tables
    By slimjen in forum Modules
    Replies: 3
    Last Post: 07-14-2015, 11:45 AM
  2. Replies: 7
    Last Post: 07-07-2014, 02:39 PM
  3. Compare and show differences ...
    By raghuprabhu in forum Queries
    Replies: 5
    Last Post: 05-18-2012, 06:05 PM
  4. Compare tables and tell me differences
    By cowboy in forum Programming
    Replies: 2
    Last Post: 08-11-2010, 08:32 AM
  5. Replies: 0
    Last Post: 08-01-2009, 12:43 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