Results 1 to 6 of 6
  1. #1
    zburns is offline Advanced Beginner
    Windows 8 Access 2010 64bit
    Join Date
    Oct 2014
    Posts
    39

    Sorting Numbers (Reopened)

    Still having problems sorting numbers with text data type.
    I have used Sort: Format([Field],"0000") but it drops numbers to right of decimal and the decimal.
    How do I sort a text field such as:
    1.0
    2.2
    2.3
    13.9

    Instead of:


    0001
    0002
    0002
    0013

    Thanks

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    convert them to numeric to sort
    show the string, but sort on the converted number...

    [NumStr], CDbl([NumStr])

  3. #3
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Have you tried Format([Field],"0000.0")?

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,850

  5. #5
    zburns is offline Advanced Beginner
    Windows 8 Access 2010 64bit
    Join Date
    Oct 2014
    Posts
    39
    Thanks - That will work

  6. #6
    zburns is offline Advanced Beginner
    Windows 8 Access 2010 64bit
    Join Date
    Oct 2014
    Posts
    39
    Forgot to mention ssanfu

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

Similar Threads

  1. Sorting text field with some numbers
    By lissajo64 in forum Reports
    Replies: 3
    Last Post: 04-28-2015, 08:03 AM
  2. Sorting by Letters and then numbers with dashes
    By Analogkid in forum Queries
    Replies: 8
    Last Post: 04-29-2013, 05:05 PM
  3. Replies: 6
    Last Post: 01-07-2013, 06:41 PM
  4. Report runs until reopened
    By SFC in forum Reports
    Replies: 2
    Last Post: 08-21-2012, 04:07 PM
  5. Sorting numbers on a report
    By paul123 in forum Access
    Replies: 6
    Last Post: 02-15-2012, 03:34 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