How to sort records in a report

M

Michele E

I have created a report which shows a summary of the performance of all
operators in our plant. I want the report to print out with the operators
names in alphabetical order. I have this listed as SELECT [crews].ID,
[crews].Operator FROM [crews] ORDER BY [Operator]
When my reports prints though, it puts the operators in numeric oder (based
on the ID number that was orignally automatically assigned to them. How do I
change this?

Thanks!
 
J

John Spencer

Reports more or less IGNORE the order by clause of a query.

You should always use the Reports Sorting and grouping to set the order of the
records. In Versions prior to 2007, open the report in design view and select
Sorting and Grouping from the View menu. There is similar functionality in
2007 (hunt for it on the ribbon).

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
 
G

ghetto_banjo

Reports in Access do not utilize the ORDER BY clause of the source
query.

Instead, you need to set it up in the Sorting & Grouping window. In
Access 2003, this can be found in the View menu (or right click in the
report to see the option appear).
 
J

Jerry Whittle

Take the sort/Order By out of the query. Reports don't use the sort order of
the query and actually resorts it. Having a sort in the query can actually
make the report slower!

Instead use the report's sorting and grouping options.
 
M

Michele E

I've got this: SELECT crews.ID, crews.Operator FROM crews ORDER BY [Operator];
in my report under the properties for row source, but it still does not
work. The operators are still coming up in a random (that I can tell) order.
Any other suggestions?
--
Michele E


Jerry Whittle said:
Take the sort/Order By out of the query. Reports don't use the sort order of
the query and actually resorts it. Having a sort in the query can actually
make the report slower!

Instead use the report's sorting and grouping options.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


Michele E said:
I have created a report which shows a summary of the performance of all
operators in our plant. I want the report to print out with the operators
names in alphabetical order. I have this listed as SELECT [crews].ID,
[crews].Operator FROM [crews] ORDER BY [Operator]
When my reports prints though, it puts the operators in numeric oder (based
on the ID number that was orignally automatically assigned to them. How do I
change this?

Thanks!
 

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