UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> List Ordered By Selected Items, Access 2016    
 
   
ocoutrun
post Jan 11 2017, 10:52 AM
Post#1



Posts: 87
Joined: 24-January 14



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
Go to the top of the page
 
theDBguy
post Jan 11 2017, 10:59 AM
Post#2


Access Wiki and Forums Moderator
Posts: 68,294
Joined: 19-June 07
From: SoCal, USA


Hi,

What do you have in the MultiSelect property: Simple or Extended?

--------------------
Go to the top of the page
 
ocoutrun
post Jan 11 2017, 11:03 AM
Post#3



Posts: 87
Joined: 24-January 14



listboxes set to Simple

Go to the top of the page
 
theDBguy
post Jan 11 2017, 11:27 AM
Post#4


Access Wiki and Forums Moderator
Posts: 68,294
Joined: 19-June 07
From: SoCal, USA


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...

--------------------
Go to the top of the page
 
ocoutrun
post Yesterday, 12:53 PM
Post#5



Posts: 87
Joined: 24-January 14



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
Go to the top of the page
 
theDBguy
post Yesterday, 01:21 PM
Post#6


Access Wiki and Forums Moderator
Posts: 68,294
Joined: 19-June 07
From: SoCal, USA


Hi,

Congratulations! Glad to here you found a solution. Good luck with your project.

--------------------
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    17th January 2017 - 04:43 PM