Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to NOT load query in subform when Main form starts up?

Status
Not open for further replies.

mauricionava

Programmer
Jul 8, 2005
209
US
Hello! I have a form with a subform on it that looks at a query that takes a lot of time to load. I have the query to look for the values on a Text field that I have in my main form and then load the results in the subform.
The subform loads when the main form starts up and the query starts to run and it takes forever to load.
How can I stop the query in the subform at the At Start Up event and only run it when I hit the Search button?

thank you!!!!
 
leave the record source proptry blank
and add this to your search button

if me.subformcontrol.form.recordsource = "" then
me.subformcontrol.form.recordsource="quryname"
end if
 
My Search button currently has Me.qryUploadToCars_search_subform.Requery in the OnClick Event.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top