Solved

Combo box vs list box or subform performance

Posted on 2004-10-20
8
214 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 250 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 44

Expert Comment

by:Arthur_Wood
Comment Utility
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
Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

 
LVL 44

Expert Comment

by:Arthur_Wood
Comment Utility
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
Comment Utility
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
Comment Utility
>  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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now