By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,469 Members | 2,271 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,469 IT Pros & Developers. It's quick & easy.

Reorder entries in combobox

P: 19
I want allow my client the option to reorder the entries in combo boxes to better reflect changes in the organization. What I was envisioning was something like when you create a report and you possible fields in the left side box and selected fields in the right. In my case, though, the left hand box has all of the values in the current order and the right hand box will have the values in the new order. The user would drag the values one at a time until the next to last, then the remaining value would drop to the bottom. Then, if this is acceptable, the user clicks a button and the combo box is now in the new order. Values can be dragged back the other way as well and there would be a cancel button as well if the user decides to abandon the action. Does anyone have any ideas how to start this?

Thanks for your attention.
Jul 26 '07 #1
Share this Question
Share on Google+
4 Replies


puppydogbuddy
Expert 100+
P: 1,923
I want allow my client the option to reorder the entries in combo boxes to better reflect changes in the organization. What I was envisioning was something like when you create a report and you possible fields in the left side box and selected fields in the right. In my case, though, the left hand box has all of the values in the current order and the right hand box will have the values in the new order. The user would drag the values one at a time until the next to last, then the remaining value would drop to the bottom. Then, if this is acceptable, the user clicks a button and the combo box is now in the new order. Values can be dragged back the other way as well and there would be a cancel button as well if the user decides to abandon the action. Does anyone have any ideas how to start this?

Thanks for your attention.
Access has no native Drag and Drop Controls, so you have to use mouse move events to simulate D & D, or use a third party ActiveX or Add-in.

MS Knowledge Base “How To” Do It Yourself
http://support.microsoft.com/kb/287642

Third Party ActiveX Control
http://www.softelvdm.com/boxocx.html

Third Party Add-in
http://www.peterssoftware.com/dd.htm
Jul 27 '07 #2

P: 19
Thank you for the links. They are most helpful. I can live with clicking, if it comes down to it. And, if I didn't specify it, the contents of both boxes will be lists, not combos, so multi select is possible.

The other issue is how do I use the order in the right hand box to populate the table that is the source of the drop downs. My idea was to use a For or While loop to go through the entries on the right hand side and repopulate the table. Is this doable?

Access has no native Drag and Drop Controls, so you have to use mouse move events to simulate D & D, or use a third party ActiveX or Add-in.

MS Knowledge Base “How To” Do It Yourself
http://support.microsoft.com/kb/287642

Third Party ActiveX Control
http://www.softelvdm.com/boxocx.html

Third Party Add-in
http://www.peterssoftware.com/dd.htm
Jul 27 '07 #3

puppydogbuddy
Expert 100+
P: 1,923
Thank you for the links. They are most helpful. I can live with clicking, if it comes down to it. And, if I didn't specify it, the contents of both boxes will be lists, not combos, so multi select is possible.

The other issue is how do I use the order in the right hand box to populate the table that is the source of the drop downs. My idea was to use a For or While loop to go through the entries on the right hand side and repopulate the table. Is this doable?

If you look at example 2 in the microsoft link, you will see that they are listboxes that have an Order By clause. This means that the reordering is already built-in...there is nothing you have to do, except specify the field to order by. The list boxes in the example are mult-select, so that is no problem either.
Jul 27 '07 #4

puppydogbuddy
Expert 100+
P: 1,923
Just found this and believe you should look at it ......may make things considerably easier for you.

http://www.lebans.com/vb_listbox.htm
Jul 28 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.