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!

Advanced Sort - Not Alphabetical 2

Status
Not open for further replies.

eques4

Technical User
Jun 1, 2002
34
0
0
GB
Hi All

I want to sort my records in my datasheet by more than one field but I want one category in one of the fields to be placed first.

The name of this category is "L" but there are other categories that come first in the alphabet (eg "P" and "V")

Is there a way I can make it sort in an order I specify?

Many thanks

Harry
 
hi

i would do this by having a seperate table of categories (a good idea anyway ?), in that table have a column (number type) called sequence, to get your sort, join the original table and the category table on the category column, and sort on the sequence column. by puuting appropriate values in to the column "sequence" you can achieve whatever sequence you wish

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
One way is to create a table and specify which order you want to sort in, such as L = 1, B = 2, V = 3, etc. Then link that in a query where you sort on the number, but do not show the number, only the letter. This also allows you to change the order around easily by just changing the numbers in the table.
 
Thanks for the useful advice. However, I have already created the table and it feeds into a form. Therefore to add columns or create a new query would complicate things at this stage.

Is there not a way it can be done direct on the Advanced Sort section, perhaps in the criteria box?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top