Form performance

L

Leslie Isaacs

Hello All

Does the number of buttons on a form affect its opening speed?

I have a form that takes 30-40 seconds to load - but only the first time
it's loaded: after closing the form, it can be re-opened very quickly! Why
the difference?

Final question: is it possible to copy buttons from one control to another -
ideally more than one at a time - in a way such that their OnClick events
come with them?

The form is based on a simple query that opens almost instantly. The form
did have 6 subforms, about 200 buttons (almost all of which were to open
reports) and about 10 comboboxes and a few checkboxes, but as part of my
efforts to speed it up I removed all the subforms - no effect - then started
removing pages from the tab control - still no effect - finally removed the
entire tab control - finally the form opens quickly, every time. So now I
need to start adding the buttons etc. back, but before I start this (it's
going to be a long job) I wanted to check here whether there's some
fundamental thing I'm doing wrong. I should add that I've done plenty of
decompile/compact+repair/recompile operations, and also tried exporting the
form and re-importing it to/from another mdb, but none of this has helped.
Most of what I've read on the subject (thanks for the links Daniel) seems to
be about subforms, but my problem remains even without any subforms.

Hope someone can help
Many thanks
Les
 
A

Allen Browne

30-40 sec is a long time. Presumably you did a compact after removing the
subforms. I take it that the application is compiled (Compile on Debug menu,
in code window.) If the database is being opened under different versions of
Access, it may be decompiling. Creating an MDE might be one way to test
against that.

Might it be easier to use a combo box or list box to choose the report, and
then just one button to open it?

What version of Windows? What version of Access?
 
P

PayeDoc

Hello Allen

Many thanks for your reply.

Yes - I've done lots of compacting, and decompiling/recompiling, before and
after removing the subforms. The mdb is a split FE/BE A2K one, running under
W2K. One thought I've had is that I think I've read somewhere, ages ago,
that access 'remembers' all the controls that have ever been on the form -
so that even after they've been deleted, and the mdb compacted/recompiled,
the form still 'thinks' that there are all the controls that ever existed on
it: is that right?

I like your suggestion of using a listbox to select the report. One
potential problem would be that the report names are less user-friendly than
the current button captions. Perhaps I could create a table of actual report
names with corresponding user-friendly names, and use that as the data
source for the listbox report selector? That would - presumably - also allow
me to provide 4 listbox report selectors, coresponding to the 4 categories
of reports that exist: does this sound like a good idea?

Thanks again for your help
Les
 
A

Allen Browne

Yep: that approach with the list box sounds feasible.

If there's 4 categories, this table would have fields such as:
- ReportName the actual name of the report
- FriendlyName the name you show in the listbox
- ReportCat the category this report belongs under.
 
L

Leslie Isaacs

Allen

OK - list boxes it is then ... but how do I create the underlying tables?

Also, I just wondered what your thoughts were about forms 'remembering'
about controls that have been deleted?

Thanks again for your help.
Les
 
A

Allen Browne

I can't really comment regarding the extent to which Access remembers. You
could try adding a new text box: the numbering may resume where it left off,
e.g. Text654. If so, a SaveAsText, delete, and LoadFromText might be a way
around it:
http://allenbrowne.com/ser-47.html#SaveAsText

I assume you know how to create a table, and I've suggested the fields.

There is a way to get a list box to read the names of your reports, but it
probably won't suit you: not friendly names, and subreports show in the list
as well. If you want it:
http://allenbrowne.com/ser-19.html
 
P

PayeDoc

Allen

OK - got it!

I have read your info at http://allenbrowne.com/ser-47.html#SaveAsText, and
will certainly try this as I'm having a few problems with the main form.
Regarding the reports listbox, I will use the method at
http://allenbrowne.com/ser-19.html to create a new table of reports (using a
make-table query), then add columns for user-friendly names and categories.
I realise I will then have to keep this up to date with new reports, but
that's OK.

Many thanks for your help.
Les
 

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