Results 1 to 3 of 3
  1. #1
    Dachbo is offline Advanced Beginner
    Windows 7 32bit Access 2013
    Join Date
    May 2015
    Posts
    42

    order multiple columns in list box

    I have a list box and I want to order data in multiple columns.



    I used the ORDER BY statement, but I just can order one column at once. I would like to order one column, let's say 1, 2, 3.. and then I would like to order another column, by some random naming like aaa, bbb, ccc (but not in alphabetical order) so it looks like this:

    1 aaa
    1 aaa
    1 bbb
    1 ccc
    2 aaa
    2 bbb
    2 bbb
    3 aaa


    What does the code look like, or the ORDER BY statement?

  2. #2
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,399
    select flda, fldb from mytable order by flda, fldb

    replace names with your field and table names

  3. #3
    Dachbo is offline Advanced Beginner
    Windows 7 32bit Access 2013
    Join Date
    May 2015
    Posts
    42
    ok thanks, it works, I just forgot the comma between the two "order by" statements

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

Similar Threads

  1. How to order columns in ascending order?
    By darkingthereturn in forum Access
    Replies: 5
    Last Post: 06-18-2012, 05:24 AM
  2. Columns change order
    By copaaccess in forum Queries
    Replies: 1
    Last Post: 02-28-2012, 08:52 PM
  3. Report will order/sort 4 columns but not 5. Why?
    By TomHolden in forum Reports
    Replies: 6
    Last Post: 12-17-2011, 04:25 PM
  4. Replies: 0
    Last Post: 06-02-2011, 04:19 AM
  5. Replies: 6
    Last Post: 04-13-2011, 06:55 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