Results 1 to 4 of 4

How to make my query not equal to...

  1. #1
    katrinanyc926 is offline Novice
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Posts
    10

    How to make my query not equal to...

    I have about 15 fields in my query and I want to narrow one field down so that it does not equal "Case1" and does not equal "Case2". I want all other cases to show up that do not have "case1" or "case2" in this certain field.

    I wrote in the criteria for this field the following, but it doesn't seem to be working:

    <>"case1" Or "case2"

    It still returns "case2"

    I have tried a lot of variations and nothing seems to work. Help, please.

  2. #2
    ConneXionLost's Avatar
    ConneXionLost is offline Simulacrum
    Windows XP Access 2003
    Join Date
    Jan 2010
    Location
    Victoria, Canada
    Posts
    291
    <>"case1" And <>"case2"

  3. #3
    katrinanyc926 is offline Novice
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Posts
    10
    Oh thank you! It worked!

    I have another questions for you - or whoever....

    How do I eliminate items when an expression is empty? In other words, I do not want records to show up if a certain expression is not calculated.

    I tried typing Is Not Null in the expression's criteria, but that did not work. Any ideas on this one?

  4. #4
    ConneXionLost's Avatar
    ConneXionLost is offline Simulacrum
    Windows XP Access 2003
    Join Date
    Jan 2010
    Location
    Victoria, Canada
    Posts
    291
    A field result isn't truly null if it's the result of an expression or calculation. Try using:

    Code:
    Not like ""

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

Similar Threads

  1. Replies: 1
    Last Post: 07-30-2010, 09:28 AM
  2. Replies: 4
    Last Post: 01-27-2010, 10:39 AM
  3. Replies: 2
    Last Post: 01-13-2010, 03:29 AM
  4. Make table query
    By Zahed in forum Queries
    Replies: 1
    Last Post: 11-06-2009, 03:44 AM
  5. Set Numbers equal to each other
    By ygu3 in forum Access
    Replies: 1
    Last Post: 07-16-2009, 06:34 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
  •  
Tech Forums: Microsoft Office Forums