Full Version: List Ordered By Selected Items
UtterAccess Forums > MicrosoftŪ Access > Access Forms
ocoutrun
Hi there

I need some help with listboxes and how to order by selected items.

Here's what I have:

List box one containing:

1
2
3
4
5

List box 2 gets items from first list box by user selecting them (multi select)

I need list box 2 to be order by what the user selects

IE user selects from listbox 1 in this order

5
3
1
2

Listbox 2 would be

5
3
1
2

Is there a way to do this?

Thanks
theDBguy
Hi,

What do you have in the MultiSelect property: Simple or Extended?
ocoutrun
listboxes set to Simple

theDBguy
Okay, then. I would suggest to use the Click event of the Listbox to store the order of the selected items in a variable and then modify your code to use it when you move the selections to the second listbox.

Hope it helps...
ocoutrun
Thanks DBGuy

I went with a little different idea. I'm using a temp table between the 2 listboxes for sorting. It will handle selected and deselected items and keep them sorted.

thanks for your help
theDBguy
Hi,

Congratulations! Glad to here you found a solution. Good luck with your project.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.