Solved

Clone a ComboBox in VB6

Posted on 2008-11-02
7
426 Views
Last Modified: 2013-12-20
I have a form with 20 comboboxes, all of the have the same information, i am full them with a query result, but my question is, is there a way i can clone one of the (the first)? and i don´t have to loop trought all in order to fill the 20 comboboxes.
0
Comment
Question by:emviruena
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 22863050
why not fill them "at once" instead of filling them 1 by 1?
you could of course "copy" all the items of the first into all the others, but why loop several times?
0
 

Author Comment

by:emviruena
ID: 22863058
i fill them "at once", but still be so slow.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 22863080
how many items are there in the lists?
can you show the relevant code?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:emviruena
ID: 22863095
The list is result of a query, they are almost 1000 items.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 22863170
>they are almost 1000 items.

well, that's 2 problems at once.
first of all, that WILL take some time to be loaded: in total 20K items...

secondly, and that's the primary problem: as a user, I would HATE software that let's me choose among 1000 items in a drop-down list !!!!!
much more user-friendly would be some alternative solution, like a filtering text-box, where after typing for example 1-2 characters, the combo/list will fill only those items that match that list. a popup-form would also be nice there...

anyhow, did you already check what part takes the most time, the query, the looping or the filling? what are the timings, btw?

tip: hide the combo box controls while filling, that might help a bit.
0
 

Author Comment

by:emviruena
ID: 22863293
In fact i am take some of the recomendations you are send me, at last, do you thing there is a way to clone the combobox and its items?  thanks.
0
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 250 total points
ID: 22863324
>do you thing there is a way to clone the combobox and its items?
none that I am aware of...
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question