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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sort By Address and Surname

Status
Not open for further replies.

Olafgarten

Programmer
Sep 16, 2012
1
0
0
GB
Hi, okay i have a database of people and i need to do some sorting in a report. it's quite hard to explain but i'll try.

i want to sort by surname but group families by address. for example:

Surname Address
Aaa 123 Test Town
Aaa 123 Test Town
Bbb 123 Test Town

Ccc 453 Example Drive
Ccc 453 Example Drive

so i want it to go to the first surname, find it's family by address and list it's family.
then go to the next record and do the same
 
Your could do this in the recordset for this report.

Select * From YourAddresses Order By Surname, Address

Herman
Say no to macros
 
Herman,
I assume you are referring to the report's Record Source rather than Recordset. I never rely on the sort order in the record source as it is always ignored when there is Sorting and Grouping used in the report design.

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top