Slow form

  • Thread starter Thread starter Leslie Isaacs
  • Start date Start date
L

Leslie Isaacs

Hello All

OK: I though I knew enough to sort this one out myself, and so I gave myself
a whole day to sort out the problem - which is that my startup form takes
30-40 seconds to load. But, by the end of the day, I've done everything I
can think of, but it's still not right, so before I go any further I'm going
to have to come back to the experts!

The form, which is based on a query that opens virtually instantaneously,
started off with about 6 subforms and about 60 buttons, almost all of which
were arranged on a 8-page tab control. The form also had some fairly trivial
OnCurrent and some OnLoad code. To cut a long story short, by increments I
reduced the form right down until it had no tab control at all, and just two
comboboxes in the detail section - and no event code. At many of the stages
of the reduction I did a decompile, compact/repair, compile - which was
obviously time-consuming but I was convinced I was doing the right thing!
Even with just the two comboboxes in the detail section, the form took 30
seconds to open. Finally I had just the form - no controls at all - and hey
presto, it opened immediately. So then I added back the two comboboxes in
the detail section (copied then from a copy of the original form), and still
the form loaded very quickly. Excited now, I tried adding a few more
controls back - but then the killer: a message that I could not add any more
controls!!! At this point my rebuilt form just had about two comboboxes, and
3 or 4 textboxes, plus a couple of buttons - but the form itself had no
event code.

That's it. Any ideas, anyone? I really hope so, because (a) this has driven
me nuts today, and (b) the slowness of the form is really getting on
everyone's nerves!

Grateful as ever.
Leslie Isaacs
 
One thing that has help me in my own development was to dynamically load tab
page subform when a tab is clicked rather than loading them all when then
master for is opened, see:

http://www.databasejournal.com/feat...3599781/MSAccess-Load-Subforms-Dynamically.ht
http://bytes.com/topic/access/answers/607247-tab-control-dynamic-subform-linking
http://www.fmsinc.com/microsoftaccess/Performance/Forms/LateBinding.asp

Another thing that I have read, but not tried myself yet, is to load all you
combo boxes and listbox RowSources at run-time.

As always, I would also refer you to Tony Toew's performance page, it is a
great place to start when trying to make sure you dotted your Is and crossed
your T.

http://www.granite.ab.ca/access/performancefaq.htm
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.
 
Daniel

Many thanks for your reply to this - and apologies for the delay in my
acknowledgement (I've been away!).

I will certainly look through the links you've given, and see what I can
find!

Thanks again
Les
 
Back
Top