i have a list box that i need to sort in decending order.. and when i check the sorted proporty it just does it in acending... is there anyway to set this to decending? or do ihave to write my own sort for this?
Printable View
i have a list box that i need to sort in decending order.. and when i check the sorted proporty it just does it in acending... is there anyway to set this to decending? or do ihave to write my own sort for this?
You could let the listbox sort it for you then put the items in an array and change the sorted property to false and input the array back in reverse order. Then you wouldn't have to deal with doing the actual sorting.
hey thats kewl.. its almost too easy.. thanks for the help...
If you are populating your Listbox from a recordset, the easiest way is to sort the recordset at creation time by doing an ORDER BY, set the Listbox Sorted property to False, and dump the results in your Listbox.
i'm not useing a record set.. this is a PDF retreval program.. it scans across all of our servers serching for pdf files that contain the specified account number in the name.. and i need to have PDF files sorted in decending order in the list box so they see the newest pdf's first.. now i got a new question.. i'm useing the item data to hold the key to an array that stores the address of the pdfs... cuz i only show the user just the name of it.. how do i keep my itemdata accurate??
The new key to the array will be Ubound(YourArray) - original key.
yep... i must be dense today.. sorry for being an idoit... thanks for the help!!
List1.Sorted = True
says i cant assign to a read only property... any other way to do this?
Have 2 Listboxes in the same place and use an invisible one to sort that has a sorted = true and another visible one that is set to Sorted = False, but you sort.
yeah thats what i'm working on right now.. just tring to copy the itemdata to the new list box..