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

how do you sort by two fields?

Status
Not open for further replies.

rcreed1

Technical User
May 20, 2004
36
US
I have a feeling this is an easy one but not easy enough for someone like me.

I have created a database to keep track of all of the equipment in my office. (I am in the Army so we have a lot and of course we track it all with serial numbers...). Anyway, we will say computers and printers. I gave a number to each computer 1 through 10. Then I gave a number to each printer, 1 through 10. Now if I wanted to create a query that groups all items together (computers, printers...) I know I can add the ascend function in the query but then they are not displayed in the order 1 through 10 that I assigned. If I add the ascend function to that field then all number 1 items are grouped together and so on.

Sooooo how do I group all like items together in numeric order. (the item field is text, the number field is number).

Any help would be greatly appreciated. I know I could add a dummy field to this and get it work but I would rather learn if this is a do-able thing in a query.

SFC Reed
 
or just open the SQL view and paste the query above into it and switch to datasheet view to see the results.


Leslie
 
If you are displaying the results in a report then forget all the sorting in the query and do it in the report's sorting and grouping dialog.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top