Results 1 to 4 of 4
  1. #1
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Jerusalem, Israel
    Posts
    708
    Thanks
    0
    Thanked 1 Time in 1 Post

    Alphanumeric Sort (XP/2K)

    IS there a simple way to sort a field that has 1,1a,2,11,12,20,22 for example- in that order, even though the field is obviously not numeric but alphanumeric. I saw something on the MS site, but I am working with a lot of records, and if there is simple way , that would be helpful
    Thanks

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Alphanumeric Sort (XP/2K)

    It would be helpful if you told us what you found on the Microsoft site, or provided a link. Otherwise it's hard to tell if something I think of is simpler or not <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  3. #3
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Jerusalem, Israel
    Posts
    708
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Alphanumeric Sort (XP/2K)

    Edited by HansV to make URL clickable - see <!help=19>Help 19<!/help>

    I looked at using Val, but can you use that in "sorting ang grouping ", it seemd to not work for me. What I saw on MS was here: http://support.microsoft.com/?kbid=209632.
    (I thought you knew the site by heart <img src=/S/laugh.gif border=0 alt=laugh width=15 height=15> )

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Alphanumeric Sort (XP/2K)

    The most efficient way is to add the two fields suggested by the MSKB article to a query that acts as record source for the report. If that is not feasible, you can use expressions in the Sorting and Grouping Window:

    =Val([NameOfField])

    =IIf(Val(Right$([NameOfField],1))=0,Right$([NameOfField],1),"")

Posting Permissions

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