custom sort

M

masonm

hi all -
i am trying to find a way to sort my report by a custom sort method.
the sort should perform as follows:
sort the newest to the oldest:
ie)
2907
....
92496

(top
....
bottom)
 
R

Rick B

newest to oldest? You don't show us a date or age in your example.

Give us an example of your data and the order it should sort. Explain to us
what the data is.

In the example you give, changing the field to a NUMBER and sorting it
ascending will put them in that order.
 
M

masonm

newest to oldest? You don't show us a date or age in your example.

Give us an example of your data and the order it should sort. Explain to us
what the data is.

In the example you give, changing the field to a NUMBER and sorting it
ascending will put them in that order.

the data are Purchase Order numbers and are currently sorted by the
date of the PO (many POs can be entered on one date), so the report is
currently sorting them according to date order in the order they were
entered.

below is an example of the data, how it is sorting now, and how i want
to sort it...
CURRENT DESIRED
po_number po_number
2820 2921
2795 2920
2921 2919
2920 2918
2919 2917
2918 2916
2917 2915
2916 2914
2915 2913
2911 2911
2914 2911
2911 2820
2913 2795

anymore questions ... let me know
 
R

Rick B

If I am reading it correctly, you just need to sore descending by PO number.
2921, 2920, 2919, 2918, 2917, 2916, etc.
 
M

masonm

If I am reading it correctly, you just need to sore descending by PO number.
2921, 2920, 2919, 2918, 2917, 2916, etc.

right, but there are PO numbers (not displayed in the example, sorry!)
that mess up the sorting by descending order

so a better example is:
CURRENT DESIRED
po_number po_number
98652 2921
2820 2920
2795 2919
2921 2918
2920 2917
2919 2916
2918 2915
2917 2914
2916 2913
2915 2911
2911 2911
2914 2820
2911 2795
2913 98652

sorry for the mixup...getting ready to go on vacation for a week and
my mind is else where. hope you can help me out
 
R

Rick B

Ok, now I don't understand the order. Why does 98652 come after 2795? I
don't understand the logic any more.
 
M

masonm

Ok, now I don't understand the order. Why does 98652 come after 2795? I
don't understand the logic any more.

hi -
i was on vacation for the last week, so sorry for not responding.

98xxx is the year 1998 and whatever the PO# was...when y2k rolled
around the company (I was not with at the time) developed the
numbering system 2xxx.
so when sorted, the numbers should go from NEWEST to oldest (oldest
being 9xxxx).

the logic is screwy, but i didnt come up with it, i am just trying to
make it work.

thanks for any help
 

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

Top