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: 70,853
Joined: 19-June 07
From: SunnySandyEggo


Hi,

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

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
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: 70,853
Joined: 19-June 07
From: SunnySandyEggo


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

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
Go to the top of the page
 
ocoutrun
post Jan 16 2017, 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 Jan 16 2017, 01:21 PM
Post#6


Access Wiki and Forums Moderator
Posts: 70,853
Joined: 19-June 07
From: SunnySandyEggo


Hi,

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

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    21st October 2017 - 06:18 PM