Form slow to open in view and design

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I created a complex form that displays 30 list boxes. It is extremely slow to
open - upwards of five minutes. The list boxes are all drawn from different
queries. I tried to create tables instead, but that did not help. I have
compacted & repaired, and transferred everything to a new database. Same
result.
 
A form with 30 list boxes is going to be slow to load. It has to build the
rowsource for each of those listboxes. Having list boxes also implies quite
a bit of VBA. There are a couple of things you may try.
Move as much code as you can to a standard module and call it from your
events rather than having the code in the event procedure.
I have a form that originally had only 6 list boxes. It took from 1 to 2
minutes to load. What I did was create the list boxes with no rowsource. I
set the height of the list box to 0. I put a command button just above the
list box. When the user wants to use a list, the code behind the command
button establishes the rowsource and sets the height back to what it needs to
be.

I hope this might help a little.
 
Back
Top