Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Combo box vs list box or subform performance

Posted on 2004-10-20
8
Medium Priority
?
248 Views
Last Modified: 2012-05-05
We currently have a combo box on our client form displaying client names but the list for some of our customers is quite large (approaching 10,000 records) with performance in control loading seriously degrading. We need to find either a better way to display the names to initiate a search or a faster way to load the control. I've been told, though admittedly don't understand, to use a subform or list box instead of a combo. Is this true?? and why would it be faster? If anyone can offer suggestions on an approach to looking up names with this many records it will be greatly appreciated.
0
Comment
Question by:ACCESSIBLESOLUTIONS
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 44

Accepted Solution

by:
Arthur_Wood earned 750 total points
ID: 12357445
yes, 10,000 entries in a single combo box will take a long time to load, and whether it is a combobox or a Listbox makes no difference whatsoever.  Can you break the 10,000 entries into logicval groups, and then load the group names, and only after selecting a group, load just the items for that group?

For example, let's say that the original list was cities in the United States.  These could be grouped by State, so that you would first choose a State, and then a second combo box would load just the cities in THAT state.  This would be MUCH faster, than trying to load all 10,000 cities at the outset.

AW
0
 

Author Comment

by:ACCESSIBLESOLUTIONS
ID: 12357542
We thought about that but in our case all the clients are in the same community. We even grouped by the initial of the last name ie all names that begin with A, as an example, but everyone complained it was to restrictive! The only appeased solution here I do believe is some extraordinary look ahead code that will simple put load the control faster or a completely different search technique. What search techniques do companies like Visa and Master card or Sears use?
0
 
LVL 39

Expert Comment

by:stevbe
ID: 12358945
You could make a free text search that pulls back a list of names that match the soundex value of the name typed in the search form and display thise names in a list box for then to choose from if there is more than 1 result, then you the seelction from the listbox for the final query to pull back only the necessary info for your main form.

Steve
0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 12358958
I believe that they create 'logical groupings'.  When you say the same community, are you speaking about a communiity like a town?  Can you group then by 'neighborhood', or section of town ( for instance, in some towns, the town is sub-divided into NW, NE, SW and SE).  Anything that you can do to cut down on the number of entries that must be loaded into the ComboBox at any one time.  If not, then users are just going to have to be willing to deal with the lag time that is required to load and search through that many entries.

AW
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 12358983
It is rarely a good design to load more than perhaps 1,000 entries into a ListBox or ComboBox control.  And there is almost always a way to 're-group' the Large block into smaller sub-blocks.

AW
0
 
LVL 39

Expert Comment

by:stevbe
ID: 12359052
I would like the opportunity to try my typing skills again ...

You could make a free text search that pulls back a list of names that match the soundex value of the name typed in the search form. This list of names would be displayed in a list box for the users to choose from. After a selection has been made on the listbox you can use that value in a query to pull back only the necessary info for your main form.

Steve
0
 
LVL 41

Expert Comment

by:shanesuebsahakarn
ID: 12365069
>  to use a subform or list box instead of a combo.

As AW says, a list or combo makes no difference. Their relative performance is identical and degrades after exceeding around 2000 records. A subform might do what you need, but is almost identical to Steve's suggestion. Basically, you'd have a text box on your form. Your subform displays the appropriate fields from the table where your combo original grabbed its records from. You now filter the subform in the AfterUpdate event of the textbox along the lines of:
Me!MySubformControl.Form.Filter="[LastName] Like '*" & Me!MyTextBox & "*'"
Me!MySubformControl.Form.FilterOn=True

or by changing its record source:
Me!MySubformControl.Form.RecordSource="SELECT * FROM MyTable WHERE [LastName] Like '*" & Me!MyTextBox & "*'"

If you want to do an exact match, you simply change the Like to = and omit the wildcard * characters.
0
 

Author Comment

by:ACCESSIBLESOLUTIONS
ID: 12368089
Thanks everyone for your contribution. I guess I was looking for magic that wasn't forthcoming since all the suggestions were the same (divide and conquer). To that end, I'll award the points to the first individual that responded.
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

916 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