Results 1 to 4 of 4
  1. #1
    concrete is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Sep 2016
    Posts
    2

    Unhappy How to write a query

    Hi,



    I am working on a database and I need to create query, finding all the products where the SIZE mm includes 15 and SHELF is between 2 and 4 (inclusive) or between 6 and 9 (inclusive).

    Anyone help with this?

    Thanks in advance...
    Attached Files Attached Files
    Last edited by concrete; 09-07-2016 at 09:31 AM. Reason: adding attachement

  2. #2
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Do this on two Criteria Rows in your Query Builder (which then treats it as an "OR" situation).

    Criteria Line 1:

    Under SIZE: Like "*15*"
    Under SHELF: Between 2 and 4


    Criteria Line 2:

    Under SIZE: Like "*15*"
    Under SHELF: Between 6 and 9

  3. #3
    concrete is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Sep 2016
    Posts
    2
    Thanks Joe,

  4. #4
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    You are welcome!

    When using the Query Builder to create queries, the thing to remember is the following:
    - Multiple Conditions entered on the same row are treated as "AND"
    - Conditions entered on multiple rows are treated as "OR"

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

Similar Threads

  1. How to write query in access using NOT IN
    By rmayur in forum Queries
    Replies: 2
    Last Post: 02-24-2015, 03:07 AM
  2. Help to write query?
    By mlandis in forum Queries
    Replies: 4
    Last Post: 02-17-2012, 09:42 AM
  3. How Do I Write This Query?
    By TxTcher in forum Forms
    Replies: 8
    Last Post: 08-13-2010, 01:50 PM
  4. How would I write this query?
    By tigers in forum Queries
    Replies: 1
    Last Post: 02-08-2010, 08:29 AM
  5. write a query how to???
    By flamingo in forum Queries
    Replies: 0
    Last Post: 01-13-2009, 03:57 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