Results 1 to 2 of 2
  1. #1
    MissLotus is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Posts
    10

    Criteria / expression help

    I have 4 fields that is a Yes/No format eg x1, x2, x3, x4.
    What I am trying to achieve is that if anyone of x1,x2,x3 is a "Yes" and x4 is a "NO" to be filtered and displayed.
    I think I am putting the expression wrong because I have it as x1-3 "Yes" and x4 'No", it seems like all the records are appearing.

  2. #2
    Dal Jeanis is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    Code:
    SELECT MyField1, MyField2, MyField3
    FROM MyTable
    WHERE x1 AND x2 AND x3 AND NOT x4;
    or
    Code:
    SELECT MyField1, MyField2, MyField3
    FROM MyTable
    WHERE MyTable.[x1] = True AND MyTable.[x2] = True AND MyTable.[x3] = True AND MyTable.[x4] = False;

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

Similar Threads

  1. Criteria expression
    By kdbailey in forum Access
    Replies: 4
    Last Post: 08-13-2012, 04:00 PM
  2. Data Type mismatch in criteria expression
    By elb1999 in forum Queries
    Replies: 2
    Last Post: 01-20-2012, 02:38 PM
  3. datatype mismatch in criteria expression
    By CyberSkillsz in forum Access
    Replies: 1
    Last Post: 06-14-2011, 10:56 AM
  4. Criteria expression
    By benlw in forum Queries
    Replies: 1
    Last Post: 01-27-2011, 09:34 AM
  5. Data type mismatch in criteria expression
    By Douglasrac in forum Forms
    Replies: 3
    Last Post: 11-23-2010, 10:46 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