Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2008
    Posts
    2

    Unanswered: Combining 2 Different SQL Row Source Statements

    I have a combo box that I want to say " All", "Yes" and "No" that is based on a column in my table with -1, 0 as the field entries (true/false).
    My problem is that seperately I have one SQL statement that changes the -1, 0's in my combo box to "Yes" "No". I have another that will add the "All" field. My problem is that I believe I need to combine the two into one fluid SQL statement.
    My SQL that changes the -1, 0 to Yes, No is:

    Code:
    SELECT DISTINCT CUSTOMERS.CONTRACT, IIf([CONTRACT]=-1,"Yes","No") AS YN_Value FROM CUSTOMERS;

    My SQL that adds All as an option is:

    Code:
    SELECT CONTRACT As Filter, CONTRACT FROM CUSTOMERS UNION SELECT "*" As Filter ," All" As CONTRACT FROM CUSTOMERS ORDER BY CONTRACT;

    Again, these work fine independently, I just need them to work together in one combo box.

    Any Suggestions?

  2. #2
    Join Date
    Jul 2004
    Location
    South Dakota
    Posts
    267
    Visit this link for a little help.

    http://www.mvps.org/access/forms/frm0043.htm

    C

  3. #3
    Join Date
    Mar 2008
    Posts
    2
    Quote Originally Posted by canupus
    Visit this link for a little help.

    http://www.mvps.org/access/forms/frm0043.htm

    C
    Thank you but I've been to that link already and either don't understand it or it doesn't have what I'm looking for.
    I'm self taught in Access, and not much beyond a novice. If that link is what I need, could you/someone please spell it out a little more clearly?
    Thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •