How you sort numbers?

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

Guest

Access 2000

How you sort==> 10000, 10001 ,10002 ,100000 ,150000 ,20000

We know how to answer by common sense, but the sorting in Access form
(continuos form) is this

10000
100000
10001
10002
150000
20000

It sort by numerical value by left side, and what i want is sorting by value.

Anyone know how to solve this technical problem?

Thanks
Kennykee
 
It would appear that your numbers are being treated as text.

If the field is, in fact, a text field, can you change it to numeric? If
not, add a computed field to your query that wraps the Eval() function
around the field in question, and sort on that computed field.
 
It looks like your field is a text field and Access is sorting by the text
values. You can change the field type to number, or you can convert the
values on the fly in a query and sort by the converted values. Try building
a query and add a calculated field like:
Number: CLng([TextField])
Assuming your field is called TextField, this will create a calculated field
called "Number" that will sort like a number.
 
It looks like your "numbers" are actually Text values to Access since what
you got is how Access sort String values.

Are you sure these are numeric values and not simply Strings with digit
characters?
 
Back
Top