List records by desired groups instead of sort

NovaDude

New member
Local time
Today, 16:25
Joined
Aug 1, 2007
Messages
4
Data in table “tblEmployees”:

EmpName GroupNum
Jon Group1
Sam Group2
Tom Group1
Bob Group1
Hal Group2
Dan Group3
Cal Group2

With sample table above, can I write a query in Access that lists the data by GroupNum based on my criteria, say Group2 1st, then Group3, then Group1? Basically, how do I make the result show:

Sam Group2
Hal Group2
Cal Group2
Dan Group3
Jon Group1
Tom Group1
Bob Group1
 
Add a sort field to your table and group by it.
 
Oh ok. I was hoping there is a better/faster way to do this without adding additional field. Thanks.
 
Nope, nothing faster or better.

This is due to an old programmer's rule. Access won't tell you anything you didn't tell it first. If you want to use a non-standard sort order, you have to tell Access that order. Otherwise it will sit and stare at you.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom