Sorting

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
 
A

Allen Browne

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.
 

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

Top