Stop Subform query

  • Thread starter Thread starter XMan
  • Start date Start date
X

XMan

Is there a way to stop subform query when opening the mainform? I would like
to have user to click on button to run the subform query. It takes too long
when main form opens. TIA.
 
You can't stop query, but there is a simple way to do what
You want to do.

Open your subform in design view. Set .RecordSource = "".
Save changes and close subform.

Open your Main form and place button. In the body of
OnClick procedure put it line:
Me!SubformName.RecordSource = yourQueryName

That's all!
 
What about data fields attaching to controls?


losmac said:
You can't stop query, but there is a simple way to do what
You want to do.

Open your subform in design view. Set .RecordSource = "".
Save changes and close subform.

Open your Main form and place button. In the body of
OnClick procedure put it line:
Me!SubformName.RecordSource = yourQueryName

That's all!
 
Thanks for an excellent suggestion! I was able to make it work. I just
assign the controls with data names and make them invisible until running
the query and make visible.
 
Back
Top