numerical order

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

Guest

Help! Within my 'number' field, Access sorts my numbers as 1,949 coming
before 150. How can I get it to sort numbers correctly?
 
Sounds as though your numbers are in a text field (as opposed to a numeric
field), or else you're using the Format function on them (as opposed to just
formatting the field), which converts them into text.

The ASCII representation for a comma is 44, which is smaller than any of the
digits (0 is 48, 1 is 49 and so on), therefore 1, comes before 15 when
sorting.

If this is a query and it is a text field, try creating a calculated field
to convert the text to an actual number (use either the CLng or Eval
functions), and sort on that field instead.
 
photo-er said:
Help! Within my 'number' field, Access sorts my numbers as 1,949
coming before 150. How can I get it to sort numbers correctly?

Are you sure it is a number field and not a text field with numbers?
 

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