sorting

G

Guest

How do i customize a sort in Access 2002, if I want to have a different order
than just accending and descending. Is that possible. I have made a
make-table query and then I calculed a sum and appended it to the tabe. I
now want to make a report with the values of each product and the totals at
the bottom but sort accending and descending does not meet my needs
 
G

Guest

How exactly do you want to sort?

You can only sort in two ways - ascending or descending.
However, if the sort you want is more complicated, you can generate a
ranking, and then sort on that.

For example
Rank :Iif([Position]="Chairman",1,iif([Position="Director",2,3))

this would give the chairman a rank of 1, directors a rank of 2 and everyone
else a rank of 3.
I would then sort by RANK ascending followed by surname ascending. This
would give me a seniority sort with a surname sort within that.

If that's not the sort of thing you're after, let me know what you want to
do and I'll try to help.
 
G

Guest

Test from Microsoft

JackP said:
How exactly do you want to sort?

You can only sort in two ways - ascending or descending.
However, if the sort you want is more complicated, you can generate a
ranking, and then sort on that.

For example
Rank :Iif([Position]="Chairman",1,iif([Position="Director",2,3))

this would give the chairman a rank of 1, directors a rank of 2 and everyone
else a rank of 3.
I would then sort by RANK ascending followed by surname ascending. This
would give me a seniority sort with a surname sort within that.

If that's not the sort of thing you're after, let me know what you want to
do and I'll try to help.
--
A laugh, a smile, and a pint of beer.


[QUOTE="Steiner"]
How do i customize a sort in Access 2002, if I want to have a different order
than just accending and descending. Is that possible. I have made a
make-table query and then I calculed a sum and appended it to the tabe. I
now want to make a report with the values of each product and the totals at
the bottom but sort accending and descending does not meet my needs
[/QUOTE]
 
G

Guest

well i guess i want to do a more compicated sort then, basically i have
products which i want to sort in a particular order, each of these products
are in all repective countries and I want the order of the products to be the
same in all countries if i was sort by assending and descending it would be
ok but i want to have this specific order due to the fact that when i make
a report the information has to be organised in this specific order. So do i
still need to use rank or is this not possible i hope that this is clear
and if i do need to type in the code could you tell me where thank you
so much for your help
love the quote by the way
laurent
 
G

Guest

This I did not test. Build a table with two fields - NUM and SortItem.
Number the SortItem in the order you want.
In your query link the two tables on the SortItem and use the NUM field
ascending.
 
G

Guest

TESTED.

KARL DEWEY said:
This I did not test. Build a table with two fields - NUM and SortItem.
Number the SortItem in the order you want.
In your query link the two tables on the SortItem and use the NUM field
ascending.
 
G

Guest

so how would i garentee a ranking as the products are the same in ach
country troughout

JackP said:
How exactly do you want to sort?

You can only sort in two ways - ascending or descending.
However, if the sort you want is more complicated, you can generate a
ranking, and then sort on that.

For example
Rank :Iif([Position]="Chairman",1,iif([Position="Director",2,3))

this would give the chairman a rank of 1, directors a rank of 2 and everyone
else a rank of 3.
I would then sort by RANK ascending followed by surname ascending. This
would give me a seniority sort with a surname sort within that.

If that's not the sort of thing you're after, let me know what you want to
do and I'll try to help.
--
A laugh, a smile, and a pint of beer.


[QUOTE="Steiner"]
How do i customize a sort in Access 2002, if I want to have a different order
than just accending and descending. Is that possible. I have made a
make-table query and then I calculed a sum and appended it to the tabe. I
now want to make a report with the values of each product and the totals at
the bottom but sort accending and descending does not meet my needs
[/QUOTE]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

order number in query 2
Sorting a query 6
Data sort 1
Report Sorting 7
record sorting 3
sorting tables 5
excel 2002 functions 6
Criteria sorting zip codes 1

Top