Results 1 to 2 of 2
  1. #1
    Dale S is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Posts
    8

    Sort numbers based on second digit

    I have a query where a field consists of 3 digit numbers. Normal sorting orders the numbers 117, 158, 217, 258, 317, 358, 417, and 458. How can I sort based on the second digit so the numbers are ordered 117, 217, 317, 417, 158, 258, 358, 458?

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    This will work for 3 diget numbers:
    ORDER BY Right([num],2);
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

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

Similar Threads

  1. Replies: 11
    Last Post: 12-21-2011, 09:48 AM
  2. Replies: 2
    Last Post: 10-07-2011, 08:13 PM
  3. Entering 16 digit numbers into number field
    By chrismid259 in forum Access
    Replies: 7
    Last Post: 12-14-2010, 10:40 AM
  4. Report Based on Form - Sort
    By jeffyyy in forum Reports
    Replies: 1
    Last Post: 10-16-2010, 06:15 PM
  5. export to multiple sheets based on change in sort
    By mws5872 in forum Programming
    Replies: 0
    Last Post: 06-30-2009, 07:55 AM

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