Do I need to rerun a query that feeds another query? (1 Viewer)

thardyjackson

Registered User.
Local time
Today, 02:00
Joined
May 27, 2013
Messages
45
In simplified terms, I have reportFinalResults based on data from queryA which is based on results from queryB which uses data from table1, table2, etc.

If I update table1 and table2 and then open reportFinalResults, will the changes to table1 and table2 be reflected in reportFinalResults?

Or do I have to open/run queryB and then open/run queryB and then open/run reportFinalResults to show new data?

For precautionary measures, I have a macro to open reportFinalResults that first opens/closes queryB and then queryA. I'd like to skip the sequential steps for simplicity if possible.

Thanks.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 09:00
Joined
Feb 19, 2013
Messages
16,553
providing your early queries are select queries and not action queries(make table, update, append) then there is no need to rerun them unless you have made changes such as bringing through another field or changing a calculation
 

Brianwarnock

Retired
Local time
Today, 09:00
Joined
Jun 2, 2003
Messages
12,701
Any queries referenced in a query will be run automatically, in fact from discussions that I have seen the compiler may combine the queries rather than run them serially depending on the optimisation and other considerations .

Brian
 

thardyjackson

Registered User.
Local time
Today, 02:00
Joined
May 27, 2013
Messages
45
CJ -- Thanks. Can you give me an example of what you mean by your comment below? Also, I should have mentioned I also have a control on formA that filters the results of queryB. Not sure if that requires a re-run. Perhaps that example is what you mean be your comment below?


....unless you have made changes such as bringing through another field or changing a calculation
 

CJ_London

Super Moderator
Staff member
Local time
Today, 09:00
Joined
Feb 19, 2013
Messages
16,553
if the first query is:

Select fld1 as Expr1 from myTable

you then build the subsequent queries on this.

Then you go back and edit the first query to

Select fld1 as myValue from myTable

The subsequent queries will not run because they are expecting a field called Expr1 - so you need to edit the subsequent queries to use myValue

Re your control on form A, this should not be a problem
 

Users who are viewing this thread

Top Bottom