Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2009
    Posts
    223

    Unanswered: How to sort number and text

    I want a Combo Box that shows "ID" (1-100) in the correct order. At the top I want it to give the option of "All".

    At the moment my Union Query gives the following results

    All
    1
    10
    11
    12 etc
    2
    20
    21
    22 etc

    This is wrong. How can I get the word "All" and the numbers in the correct order eg. All, 1, 2,3 ,4 ,5 6,7 8, 9, 10, 11 etc????

    I have created 2 tables:
    Table1 has the ID's as a Number (100 entries)
    Table2 has one entry which is " All" (with a space before the word) as Text

    Then I created a Union Query to join the two tables together

    select allfield
    from table2
    UNION
    select id
    from table1

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    use a numeric value or pad with leading spaces
    or
    populate the combo box yourself
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Nov 2009
    Posts
    223
    Thanks healdem,

    i think i solved the problem by changing UNION to UNION ALL.

    i dont know why it solved it, but it did.

    cheers.

Posting Permissions

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