order by

  • Thread starter Thread starter Judy
  • Start date Start date
J

Judy

I need to order a text field ascending numeric--in other
words, 1, 2, 3, 110, 113 etc. NOT as text does it: 1,
110, 113, 2, 3, etc.

How do I do that?


--Judy
 
I need to order a text field ascending numeric--in other
words, 1, 2, 3, 110, 113 etc. NOT as text does it: 1,
110, 113, 2, 3, etc.

How do I do that?

In a vacant Field cell in your query type

SortKey: Val([fieldname])

and sort by this calculated (numeric) field.
 
SELECT *
FROM TABLE
ORDER BY Val(YourTextFieldWithNumbers)

Or if the is ALWAYS a value in the field.

ORDER BY CDbl(YourTextFieldWithNumbers)
 
Back
Top