Speeding up form with numerous subforms

F

fabianjones

Hi,
I have a pretty complicated form with numerous subforms, and some of
the subforms have subforms as well. I inherited this application and
I'm trying to increase the speed. Some questions:
- Many of the queries underlying the form are "SELECT *" queries. I
changed some of them to "SELECT myval1, myval2, myval3 FROM mytable;"
and it actually seems to have slowed down the load time. Any thoughts?
- Aside from changing the queries per my point above, what are some
other ways of speeding up the form.

I'd appreciate any links or actual advice. Thanks.
 
A

Albert D.Kallal

Perhaps some of the sub-forms are behind a tab control?

Often, a nice layout is to have several tabs, and each tab you click on will
display the sub-forms.

It turns out that you can actually place a sub-form CONTROL on a form (in
fact, all sub-forms are just controls). When you click on a particular tab
control, you can THEN have the sub-form load. This approach would presumably
mean that if you have 1, or 14 sub-forms, the load time of the main form
would be rather fast, and not slow down one bit, since the appropriate
sub-form would ONLY be loaded when you click on the tab of your choice....


You could/would use the "on change" event of the tab control...

Like

select case me.mytab.value

case 0
' do nothing

case 1
' load sub-form behind tab 1
me.subTourFriends.SourceObject = "frmFriends"


end select

So, the above tip actually does not load any sub-form faster...but you do
NOT load any of hte sub-forms untill you actually need them....

This speeds things up by a lot....
 
F

fjones314

Thanks for the reply Albert. It does have a tab control so I will try
your suggestion.

Any thoughts on the queries themselves?
 

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