By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,851 Members | 1,603 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,851 IT Pros & Developers. It's quick & easy.

PreLoading a ComboBox from a Large Table. Still Slow?

P: n/a
I have a Combobox called cboCITY that I attempt to populate from a
LookupTable of 45000 records containing CITY STATE and ZIPCODES. It is
bound to a Field called CITY in my MainTable and the
the RowSource is as follows:

SELECT [TL-ZIPCODE].ZipID, [TL-ZIPCODE].City, [TL-ZIPCODE].State,
[TL-ZIPCODE].Zip, [TL-ZIPCODE].DefaultCity FROM [TL-ZIPCODE] ORDER BY
[TL-ZIPCODE].City, [TL-ZIPCODE].State, [TL-ZIPCODE].Zip;

Because ComboBoxes do not respond well to very large tables, I took the
advice of some posts and used the following code to populate in advance
at FormLoad time:

With Me.cboCITY 'City lookup. Loads combobox with alot of data.
.Requery
MyVariable = .ListCount
End With

All this works perfectly, when I test it in an isolated form. However,
once I introduce it to my DataBase Form, it seems to have no impact at
all. I do detect a delay when the form opens, suggesting that the load
occurs, but the combobox responds as if it was never preloaded.

Any ideas?

Greg

Jan 10 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 10 Jan 2007 14:31:15 -0800, "Ap******@gmail.com"
<Ap******@gmail.comwrote:

Pre-loading should not be your first strategy; reducing the rowcount
should be. For example if the user were to first enter the zipcode you
can populate the city dropdown using a where-clause.
Another option is to wait with populating the dropdown until at least
3 chars are entered and then use Like to find matching cities.

-Tom.

>I have a Combobox called cboCITY that I attempt to populate from a
LookupTable of 45000 records containing CITY STATE and ZIPCODES. It is
bound to a Field called CITY in my MainTable and the
the RowSource is as follows:

SELECT [TL-ZIPCODE].ZipID, [TL-ZIPCODE].City, [TL-ZIPCODE].State,
[TL-ZIPCODE].Zip, [TL-ZIPCODE].DefaultCity FROM [TL-ZIPCODE] ORDER BY
[TL-ZIPCODE].City, [TL-ZIPCODE].State, [TL-ZIPCODE].Zip;

Because ComboBoxes do not respond well to very large tables, I took the
advice of some posts and used the following code to populate in advance
at FormLoad time:

With Me.cboCITY 'City lookup. Loads combobox with alot of data.
.Requery
MyVariable = .ListCount
End With

All this works perfectly, when I test it in an isolated form. However,
once I introduce it to my DataBase Form, it seems to have no impact at
all. I do detect a delay when the form opens, suggesting that the load
occurs, but the combobox responds as if it was never preloaded.

Any ideas?

Greg
Jan 11 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.