Sorting

  • Thread starter Thread starter DS
  • Start date Start date
D

DS

On a report does the Sorting Property override the recordsource's sort
order. In other words do I even need to set the sort order in the
recordsource be it a table, query or SQL statement.
Thanks
DS
 
The sort order in a report is determined by what is in the Sorting And
Grouping dialog. (View menu, in report design view.)

If there is nothing in that dialog, the order is determined by the report's
OrderBy property, assuming you turn OrderByOn on (typically in the Open
event of the report.)

If that property is off also, the sort order is undefined. A very simple
report might sort by primary key order (if bound to a table) or by the ORDER
BY clause of RecordSource (if bound to a query or SQL statement.) But don't
rely on it: making a change, or using a WhereCondition in OpenReport could
mean it is not reliable.
 
Back
Top