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
Solved

Clone a ComboBox in VB6

Posted on 2008-11-02
7
418 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
  • 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

839 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