Results 1 to 2 of 2
  1. #1
    Rustin788 is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Mar 2014
    Posts
    47

    IIF Statement With a Range of Data

    Hey,

    I am trying to create a query that will tell me whether an order was shipped directly to the end user or to our distributors. Some of these distributors have multiple locations. So I have a Ship To Address that I want to test against say 5 other shipping addresses listed for that customer. If none of them match then that would be something directly shipped to the end user. Is there a way I can do it?

    It might not be an IIF statement I need but I'm not sure what else I could use.

    Thanks

    *Update*

    Below is a quick simplified example of the two table. The one on the left is the Sales Order table and it contains the address that order is to be shipped to. The one on the right is the customer address table and it shows all the addresses that belong the Bob. I need something that will be able to tell me the Sales Order going to Chris's house is direct to the end users.



    SalesOrder# Customer Ship To Address | Customer Ship To Address
    83823 Distributor End User's House | Bob Distributor's House
    | Bob Bill's House
    | Bob Carol's House
    | Bob Peggy's House

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    no, dont use IIFs.
    In your list of ship addrs, pull a query that matches to the addrs, ...
    so youd have 2 queries for the 2 different groups...

    Q1 that matches any address listed..
    and
    Q2 that DOESNT match (outer join), this will be the shipd to end user.

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

Similar Threads

  1. Replies: 11
    Last Post: 07-09-2014, 09:50 AM
  2. Replies: 14
    Last Post: 01-07-2014, 04:20 PM
  3. Replies: 6
    Last Post: 09-24-2013, 06:02 PM
  4. iif statement using a range (between)
    By denver1717 in forum Access
    Replies: 3
    Last Post: 10-03-2012, 07:05 AM
  5. Data range for Web Forms
    By need_help12 in forum Forms
    Replies: 7
    Last Post: 05-11-2012, 04:20 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
  •  
Other Forums: Microsoft Office Forums