Sorting Alphanumeric Field

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

Guest

I have a report based on a query which lists items stored in boxes numbered 1
to as high as 25. The results are sorted by box number by item number. Both
fields are alphanumeric.

For a query with 11 boxes, Access sorts the boxes as 1, 11, 2, 3, 4, 5, 6,
7, 8, 9.

Is there any way to convince Access that 10 comes after 9, not after 1?
 
MJoThom said:
I have a report based on a query which lists items stored in boxes numbered 1
to as high as 25. The results are sorted by box number by item number. Both
fields are alphanumeric.

For a query with 11 boxes, Access sorts the boxes as 1, 10, 11, 2, 3, 4, 5, 6,
7, 8, 9.

Is there any way to convince Access that 10 comes after 9, not after 1?
 
I have a report based on a query which lists items stored in boxes numbered 1
to as high as 25. The results are sorted by box number by item number. Both
fields are alphanumeric.

For a query with 11 boxes, Access sorts the boxes as 1, 11, 2, 3, 4, 5, 6,
7, 8, 9.

Is there any way to convince Access that 10 comes after 9, not after 1?

Your field is a Text datatype field and is sorting correctly.
If you wish to sort the field as a Number, either change the field's
datatype to Number, or change the column to an expression
SortThis:Val([FieldName])

Then sort on this column.
 

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

Back
Top