Sorting Alphanumeric Field

M

MJoThom

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?
 
M

MJoThom

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?
 
F

fredg

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.
 
Top