Stop Subform query

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.
 
L

losmac

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!
 
X

XMan

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!
 
X

XMan

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.
 

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