Results 1 to 4 of 4
  1. #1
    Metrazal is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    May 2014
    Posts
    9

    Criteria comparing two fields


    I have a situation where I am running a query and I do not want to include any results were field3 = field5. Is this possible using the criteria?


    Thanks,

    Met

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848
    What is the query code (SQL)?

  3. #3
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Assuming that the fields don't contain any null values, you would just have something like the following criteria in your SQL code:
    Code:
    WHERE [Field3]<>[Field5]
    In the Query Builder, you could do this going under the Field3 field in your grid, and placing the following on the Criteria row for that field:
    Code:
    <>[Field5]

  4. #4
    Metrazal is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    May 2014
    Posts
    9
    JoeM

    Exactally what I needed.

    Thanks,

    Met

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

Similar Threads

  1. Comparing 2 fields on 2 different tables
    By ericxmiller in forum Queries
    Replies: 9
    Last Post: 03-15-2013, 02:25 PM
  2. iif statement comparing two fields
    By unslog in forum Access
    Replies: 6
    Last Post: 09-28-2012, 02:13 PM
  3. Subquery comparing two fields
    By jdcollins in forum Queries
    Replies: 8
    Last Post: 01-17-2011, 02:02 PM
  4. Comparing fields in Access
    By flames8889 in forum Queries
    Replies: 2
    Last Post: 04-20-2010, 11:55 AM
  5. Comparing between fields
    By Dashin in forum Queries
    Replies: 0
    Last Post: 02-13-2009, 08:38 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