List box loads slowly first time but quicker on subsequent requerying

R

rbm

On my form, I have, among other things, a list box (lstAssets) and a
combo box (cmbSystem). On selecting a value in the combo box, the
list box is populated with data that applies to the system selected.
When the form is initially opened, the row source of the list box is
blank (I did this to speed up the opening of this form).

On selecting a system from cmbSystem, the row source of the list box
is assigned (a simple query that retrieves about 10 fileds from a
table) and the list box is populated. This works fine, but there is
one peculiar issue I would like to resolve if possible.

The first time this list box is populated, it takes about 20 seconds
to load. The table that it is pulling data from is fairly large -
about 66000 records. If I select a different value in cmbSystem, the
list box re-populates almost instantaneously. The On-Click procedure
for cmbSystem reassigns the list box row source (me.lstbox.rowsource =
"qryAssets_All" or me.lstbox.rowsource = "qryAssets_InScope" depending
on the state of another radio button on the form)

What is happening the first time that isn't reproduced in subsequent
requerying? Is there anything I can do to speed up the initial query?

Thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top