473,395 Members | 1,454 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Reorder entries in combobox

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
4 2486
puppydogbuddy
1,923 Expert 1GB
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
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
1,923 Expert 1GB
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
1,923 Expert 1GB
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

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

Similar topics

4
by: Andy Weinmann | last post by:
I need to make a form through which I can edit the information for companies. I used a form in which the textboxes read from different columns from a listbox to display the information for a...
2
by: Stephen Poley | last post by:
I have added a combo-box to a form but it frequently fails to display all entries in the table it is based on. There are 43 entries in the table; the control initially displayed only the first 12. ...
1
by: Mat | last post by:
Reordering Column changes column Indexes???? i use column.index to access(or add ) data in listview. i want to allow user to reorder columns as they need. So i am afraid to get wrong data when user...
0
by: uv507 | last post by:
Hello, I have found a way to easily reorder rows of my listview. But it only works in small icons mode. When I do my reordering (drag and drop in my own list) in large icons mode, the item that...
2
by: Asaf | last post by:
Hi, Below is a calss with function I gathered from a news group that uses GetCharacterPlacement API to reorder text. I have mixed text Hebrew/English and the function reorders the Hebrew text. ...
5
by: Ajith Menon | last post by:
I need to select multiple entries in the drop down list. E.g. Search a string in languages like C#, VB, Java etc. These entries are in drop down. So i need to multi select to search in multiple...
2
by: =?ISO-8859-15?Q?Ma=EBl_Benjamin_Mettler?= | last post by:
Hello list! I need to repopulate PyGTK ComboBox on a regular basis. In order to do so I have to remove all the entries and then add the new ones. I tried to remove all entries like that: def...
4
by: rdraider | last post by:
Use the Northwind database Products table as an example. Purchasing dept gets a report showing when inventory items on hand qty are below the reorder level. easy enough: Select ProductID,...
3
by: done4who | last post by:
Heres my problem: my javacript code reads each child element e.g.: <video> <author>skateboard2</author><id>xqWBGvbvw7g</id><title>zach skating</title><length_seconds>100</length_seconds></video>...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.