Sort a report

  • Thread starter Thread starter xp
  • Start date Start date
X

xp

I have a report based on a table and the "Order By" property for the report
is set to "User_Name, Voucher, Line". This sort works great except that
"Line" sorts as follows: 1, 10, 11, 12, 2, 3, etc.

What can I set the "Order by" property to in order for this data to sort
correctly?

Thanks for the assistance!
 
The line value is a text value that is composed of number characters. So you
can either change the query by wrapping the line value in the Val function or
one of the conversion functions (CLng, CInt, CDbl)

0r you can set the ORDER udinh the Val function

Val(Line)

If you are using the reports Sorting and Grouping dialog (View: Sorting and
Grouping...) then you need to enter
=Val(Line)
into the Field/Expression column.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
Back
Top