Results 1 to 2 of 2
  1. #1
    peacepower is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Aug 2011
    Posts
    3

    Query/IiF statement


    Suppose I have a set of orders I want to filter. I already filtered them for other things such as weight/dims/etc. Now I want to remove any order for which a product says Y. Then if blank or N ok to ship. But if code is listed as 3 digits numbers it cannot ship.
    So using the example attached only order 356 should be listed.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    Just more criteria to filter:

    For the CannotShip field criteria: <> "Y"

    For the Code value, create calculated field with an expression and set the criteria to "Y": IIf(IsNumeric([Code]) And Len([Code])=3,"N", "Y")
    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.

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

Similar Threads

  1. Help with conditional statement in query
    By batowl in forum Queries
    Replies: 1
    Last Post: 08-23-2011, 02:00 PM
  2. Help fix SQL Statement for query
    By Budro49 in forum Queries
    Replies: 12
    Last Post: 06-21-2011, 02:26 PM
  3. Append Query with IIF statement
    By Cheshire101 in forum Queries
    Replies: 5
    Last Post: 09-16-2010, 12:51 PM
  4. Query filter statement
    By Brian62 in forum Access
    Replies: 1
    Last Post: 02-16-2010, 02:34 PM
  5. If then statement in query
    By ronnie4 in forum Queries
    Replies: 1
    Last Post: 01-20-2009, 10:49 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