Delay Opening Of Subform

  • Thread starter Thread starter Les
  • Start date Start date
L

Les

My main form has a number of subforms which slow down the opening time. I
have been told it's posible to stop them from opening with the main form but
when the user clicks the placeholder the form will then be displayed.

Does anyone have more details on this please.

Les
 
Set the SourceObject property of your subform control to a blank string in
Design View.

In the Click event procedure of the subform (or whatever you want to have
trigger the load) set the SourceObject property of the subform control to a
string which is the name of the form you want loaded.
Even better - check first whether this property has a non-empty value, so
that you don't load the form again after it's been loaded once.

HTH
- Turtle
 
A technique I often use is to use a TabControl and a *single* SubformControl
on the main Form and NOT on a Tab Page of the TabControl. When the user
click a (little) tab of the TabControl, your VBA code can change the
SourceObject of the SubformControl to the required Subform.

This means that there is only one Subform (the "default" Subform) is opened
/ loaded on the opening of the main Form. When the user changes the Tab
Page, again only one Subform (SourceObject) is loaded so it does not have a
long delay.
 
Thanks for that but can you give a little more help with the syntax?

The subform is on a tab and the name of the subform is "frmAvailability" my
main form is "frmEmployeeinfo"

I have tried several combinations but cant get it to input the any value
into the SourceObject property. How do I refer to this property.

Thanks

Les
 
Please forget my last

Now working thanks

Les
Les said:
Thanks for that but can you give a little more help with the syntax?

The subform is on a tab and the name of the subform is "frmAvailability" my
main form is "frmEmployeeinfo"

I have tried several combinations but cant get it to input the any value
into the SourceObject property. How do I refer to this property.

Thanks

Les



to time.
 
Back
Top