Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2003
    Posts
    6

    Question Unanswered: table sorting question

    This is probably an insanely stupid question, but I'll ask and then duck for cover...

    I would like to sort by table by Column 1, Column 2, then Column 3 (just as one would do in Excel). Is that level of sorting possible?

    Second, when I try to sort Column 1, I continuously get results such as this:

    1
    1009
    105
    10508
    2
    (you get the idea)

    Why? And, how can fix this?

  2. #2
    Join Date
    Jun 2003
    Location
    USA
    Posts
    1,032

    Re: table sorting question

    Perhaps create a query (instead of trying to do secondary sorts on a table directly) with a SQL statement something like this:

    SELECT *
    FROM MyTable
    ORDER BY CLng([MyTable.MyFirstField]), MyTable.MySecondField, MyTable.MyThirdField;

    And note that the CLng() function converted the field to a number at least for the sort order.
    J. Paul Schmidt, Freelance Web and Database Developer
    www.Bullschmidt.com
    Access Database Sample, Web Database Sample, ASP Design Tips

Posting Permissions

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