Results 1 to 6 of 6
  1. #1
    Shales is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Apr 2016
    Posts
    6

    point matching query

    Hi everyone, I have just signed up and in need of help. I have used Access for years but only now am I required to build reports.



    I have a two lists of client details from 2 different sources. My goal is to compare these lists and only display records that match on 2 or more criteria.

    My query so far is like this; (the 1 and 2 represent the different sources)

    Surname1, Surname2, Name1, Name2, DOB1, DOB2, PostCode1, Postcode2

    I am after a formula field that I can stick on the end which counts the number of matches. For example Surname=Surname=1, Surname=Surname & DOB=DOB =2

    Currently surnames from both sources match as I have joined these together, so I am now just really trying to see if there are any other matches with DOB, Postcode etc.

    I will then only show the records that are >=2

    I would really appreciate any help.

    Regards
    Gavin

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Try

    Abs((Name1=Name2)+(DOB1=DOB2)+...)
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Shales is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Apr 2016
    Posts
    6
    Thanks for the response Paul. Your example above works for just Name1=Name2, but if I add a 2nd match it gives me #error. Am I doing something wrong?

    Expr1: Abs(([SanctionsSurname]=[SpitfireSurname])+([SanctionsName])=([SanctionsName2]))

    Thanks

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Try without the extra parentheses:

    Expr1: Abs(([SanctionsSurname]=[SpitfireSurname])+([SanctionsName]=[SanctionsName2]))
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Shales is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Apr 2016
    Posts
    6
    Perfect! Thanks Paul.

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    No problem Gavin, and welcome to the site!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 4
    Last Post: 07-16-2015, 11:39 PM
  2. Help with Pattern matching in access query
    By javajockey in forum Queries
    Replies: 3
    Last Post: 10-01-2014, 08:38 PM
  3. Matching Update Query
    By james28 in forum Queries
    Replies: 8
    Last Post: 08-03-2014, 10:10 AM
  4. Replies: 1
    Last Post: 10-24-2011, 08:01 AM
  5. Matching Query Dates
    By rgwynne in forum Queries
    Replies: 1
    Last Post: 08-13-2009, 05:23 AM

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