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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sort a listbox

Status
Not open for further replies.

bryn30

Technical User
Mar 5, 2001
57
US
In a MultiSelect ListBox (extended) is it possible to sort the list by clicking on the header of the column you are wanting to sort by?
 
Bryn,
In your list box, How many columns are you displaying?. Normally you should just have one. I would like to help you work on this.
Scotty ::) Become better informed. Lean from others' mistakes. You could not live long enough to make them all yourself."
-- Hyman George Rickover (1900-86),
 
there are 6 columbs. thanks for the help. one is too easy. well, unless your me and then your in trouble.
 
Normally you should have just one?? Why would you ever have JUST one is my question! Normally they are used to give people choices between things that are attached toa record identifier, and since people don't remember ID numbers but remember names/descriptions/etc.. you use a two column list box (at least) with one column being the identifier and the other being the name/description/etc..

As for the question. You can't click on the built in columns of the listbox, but you can make textboxes on top of the listbox. Format them so they look like labels and when people click on them you can associate an event to reorder the items in the listbox. You can also add ControlTips like "Click here to sort by X" so users can see they can change the sort order.

HTH Joe Miller
joe.miller@flotech.net
 
Thanks Joe.. that seems easy enough
 
Joe,
You have helped me many-a-time. I yeild to you knowledge. It is just that I use one and display other necessary information in a set of text boxes. for instance. A user can call up all the records they entered for a given date. In the list box I "add" all records for "ThisUser" for "ThisDate", then they simply scroll through the records. On the AfterUpdate Event of the list box I put "Name", "Address", "Heigth", "Weight" so on and so on in text fields located elsewhere on the form. That way they can "View" the entire record, without looking at a continuing form. My users find this more "user friendly" and it takes no more time to do it this way (from the users' viewpoint") either.

JMTC
Scotty ::) Become better informed. Lean from others' mistakes. You could not live long enough to make them all yourself."
-- Hyman George Rickover (1900-86),
 
Scotty,

It was not meant as a flame, I just didn't agree with the "normally" word. Nothing to do with programming computers is ever "normal" in my experience! :) I can see how you would do things your way for the users and can see why would you have that view on list boxes.

Joe Miller
joe.miller@flotech.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top