Results 1 to 5 of 5
  1. #1
    DavidMichaelangelo is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Nov 2013
    Posts
    12

    Question Triple Exclude / "Unmatched" Query | Access 2010


    I am using Access 2010, trying to do an exclude via the UI (2nd join type and then "Is Null") but am trying to do that for 3 fields.
    Specifically:
    I need access to return any records from one table where a match is not found in 3 fields.
    Phone, Email and Company are the fields and I need access to return any records in table 1 where Phone AND Email AND Company do not match in table 2.
    Any ideas?
    I have tried to do a triple type-2 join with "Is Null" in each criteria like a typical exclude but it is returning more not fewer matches (acting like an OR instead of AND by the looks of it)

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Post the SQL statement for analysis. Is it using OR operator?
    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
    DavidMichaelangelo is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Nov 2013
    Posts
    12
    I don't work with SQL statements directly, I use the UI which I have included an image of the setup below.
    I have pasted in the SQL below as well, but I am hoping to find a solution within the UI



    SELECT [02 Remove Tests].PromoCode, [02 Remove Tests].FirstName, [02 Remove Tests].LastName, [02 Remove Tests].BusinessPhone, [02 Remove Tests].BusinessEmailAddress, [02 Remove Tests].BusinessNameFROM [02 Remove Tests] LEFT JOIN [Campaign Members] ON ([02 Remove Tests].BusinessEmailAddress = [Campaign Members].Email) AND ([02 Remove Tests].BusinessName = [Campaign Members].Company) AND ([02 Remove Tests].BusinessPhone = [Campaign Members].Phone)
    WHERE ((([Campaign Members].Phone) Is Null) AND (([Campaign Members].Company) Is Null) AND (([Campaign Members].Email) Is Null));


  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Well looks good to me.

    If you want to provide data, attach file. Follow instructions at bottom of my post.
    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.

  5. #5
    DavidMichaelangelo is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Nov 2013
    Posts
    12
    Thanks for offering to help June.
    I found the solution here:

    http://answers.microsoft.com/en-us/o...a-36e3621d9c95

    Here's a pic for other people's reference:


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

Similar Threads

  1. Replies: 7
    Last Post: 08-14-2013, 03:57 PM
  2. Replies: 5
    Last Post: 06-26-2013, 02:29 PM
  3. Replies: 3
    Last Post: 07-19-2012, 06:22 AM
  4. Replies: 0
    Last Post: 12-06-2011, 11:01 AM
  5. Replies: 2
    Last Post: 11-04-2011, 02:45 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