suppress sub form load data process

H

Hal

Hello

I have a form which has a number of sub forms. Theses sub forms are based
upon values select in the main form. I do not want the sub forms to run
their request for data until I make them visible. How can I suppress their
loading of data ?
 
J

John W. Vinson

Hello

I have a form which has a number of sub forms. Theses sub forms are based
upon values select in the main form. I do not want the sub forms to run
their request for data until I make them visible. How can I suppress their
loading of data ?

One way is to set each subform's Recordsource property to a query which
retrieves no records, or even to a blank string, until you want the subform to
appear; at that point set its Recordsource to a query using the mainform
values as criteria.

John W. Vinson [MVP]
 
T

Tom Wickerath

Hi Hal,

One method you might consider using is to add a tab control to your form.
Place the subforms on different tabs. Then use the Tab On Demand technique to
set the Link Child Field and Source Object properties at run-time, when a
person clicks on the tab. There is a link to a tutorial for using this
technique in my multiuser applications paper:

Implementing a Successful Multiuser Access/JET Application
http://www.access.qbuilt.com/html/multiuser_applications.html

(Scroll about 1/2 way down to the sub-title "Speed up Tab controls")


Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 
Top