Sort listbox items?

rmatthew

Well-known member
Joined
Dec 30, 2002
Messages
115
Location
Texas
i have a listbox that has items taken out and put back in - easy enough. What I want to do is sort these items when something is added. Any suggestions?

Thanks in advance.
 
Are you populating list box from a database?

In your select statement, finish with ORDER BY and select how you want to sort the list. If you dont and simply sort the list after the database is queried, all your indices will be wrong. Not a problem until you try to bind other fields, then the index will pull the fields from the row that the index describes, which is not necessarily the item in the list box you have selected.
 
Back
Top