SORTING ALPHANUMERIC DATA

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have field name [fileref] and the records consists of text & number such as
PP/1/05 , PP/2/05 ...etc.

When i try to sort it the result that i get is PP/1/05 , PP/10/05 ,
PP/2/05....

Need help on how to sort it so i can get PP/1/05, PP/2/05, PP/3/05............

Appreciate your response
 
I have field name [fileref] and the records consists of text & number such as
PP/1/05 , PP/2/05 ...etc.

When i try to sort it the result that i get is PP/1/05 , PP/10/05 ,
PP/2/05....

Need help on how to sort it so i can get PP/1/05, PP/2/05, PP/3/05............

Appreciate your response

It is sorting correctly as a text value.
You want it to sort as a number value of the characters after the
first slash.

Is it ALWAYS 2 letters and a slash?
If so, using a query as record source,

Order By Val(Mid([FieldName],4))

If the number of characters before that first slash can vary in
length, then use:

Order By Val(Mid([FieldName],InStr([FieldName],"/")+1))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

How to add line numbers to groups within a query? 2
Dlookup 7
function question 1
Access Running Balance in Access 1
Substraction 5
Calculating Job Number 3
Modified Date Sort 4
date range query between 2 tables 2

Back
Top