custom sort order

  • Thread starter Thread starter Karen
  • Start date Start date
K

Karen

Hi,

I have created a query that has a calculated field. I am then grouping on
this field and performing a count. I would like the results of the query to
be returned in a specific order that is not alphabetical. Is there a way to
do this?

Thanks.
 
The solution may be to create a separate table with the desired sort
order of the values

SpecialSortOrder
TheValue - list all the possible values
TheOrder (Double) Number representing which position the value sorts in

Then you join the SpecialSortOrder table to your query results to set up
a sort order.

Another solution would be to calculate a sort order based on a custom
VBA function. What the function would be would depend on your rules for
sorting.

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 
Back
Top