Sorting a Report column

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

Guest

I am trying to do an ascending sort on a column of numbers ranging in value
from 1 to 18. The numbers come out with what appears to be an ASCII sort.
How can I get them to sort from 1 to 18 in numerical order? Thanks
Arnold
 
Arnold:

It sound like the values are of text data type. If so include a computed
column in the report's underlying RecordSource which returns the numeric
value by means of the Val Function, e.g.

SELECT *,
VAL(YourNumberColumn) AS SortColumn
FROM YourTable;

and sort the report (not the query) on the SortColumn.

Ken Sheridan
Stafford, England
 
Thanks to Ken and Tom. Foregot that one.
Arnold

Ken Sheridan said:
Arnold:

It sound like the values are of text data type. If so include a computed
column in the report's underlying RecordSource which returns the numeric
value by means of the Val Function, e.g.

SELECT *,
VAL(YourNumberColumn) AS SortColumn
FROM YourTable;

and sort the report (not the query) on the SortColumn.

Ken Sheridan
Stafford, England
 
Back
Top