Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grouping and sorting

Status
Not open for further replies.

TrekBiker

Technical User
Nov 26, 2010
330
GB
I have a report based on a query containing CustomerID, CustomerName and details of the customers' orders.

Some customers have the same CustomerName but obviously different CustomerIDs. I want to be able to arrange the sales report so it shows all orders for each distinct customer, ie by CustomerID.

If grouping by CustomerID I get the right results but not in alphabetical order by CustomerName. Grouping by CustomerName then by CustomerID displays all records for that name, ie irrespective of their IDs, so not what's needed.

How do I get records for each CustomerID to be displayed together, but on pages arranged with CustomerNames in alphabetical order?
 
Sorry for this, I eventually found how to do it in a very early Tek-Tips post,

The trick is to 'Group on CustomerID', then 'Sort by CompanyName', then use the up arrow far right to move the Sort line above the Group line.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top