I have a main form that has 10 sub forms
Each sub form’s record source is link to a different Query
It takes more then a minute to open the form, (because it’s running the query for all sub forms)
So I changed the sub forms source to SELECT * FROM tblTest WHERE false;
I also changed the main form
When the button on the main form is clicked, it’s adding the following
Me.SubMySub.Form.RecordSource = "select * from qMyQuery"
Me. SubMySub.Form.Requery
However, after I close the main form, the sub form’s record source stays linked to
SELECT * FROM qMyQuery;
And will take the same long time again to open the main form.
Does anyone have any solution?
Thank you very much
Joe
FYI - Just in case you need this information
The 10 queries are based on a single union query
The union query has a filter where one filed is pointing the main form
Each sub form’s record source is link to a different Query
It takes more then a minute to open the form, (because it’s running the query for all sub forms)
So I changed the sub forms source to SELECT * FROM tblTest WHERE false;
I also changed the main form
When the button on the main form is clicked, it’s adding the following
Me.SubMySub.Form.RecordSource = "select * from qMyQuery"
Me. SubMySub.Form.Requery
However, after I close the main form, the sub form’s record source stays linked to
SELECT * FROM qMyQuery;
And will take the same long time again to open the main form.
Does anyone have any solution?
Thank you very much
Joe
FYI - Just in case you need this information
The 10 queries are based on a single union query
The union query has a filter where one filed is pointing the main form