Go Back   Access World Forums > Microsoft Access Discussion > Queries

 
Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Old 07-09-2013, 06:25 AM   #1
thardyjackson
Newly Registered User
 
Join Date: May 2013
Location: Nairobi, Kenya
Posts: 45
Thanks: 23
Thanked 0 Times in 0 Posts
thardyjackson is on a distinguished road
Do I need to rerun a query that feeds another query?

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.

thardyjackson is offline   Reply With Quote
Old 07-09-2013, 06:30 AM   #2
CJ_London
Super Moderator
 
Join Date: Feb 2013
Location: UK
Posts: 11,334
Thanks: 40
Thanked 3,670 Times in 3,538 Posts
CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light
Re: Do I need to rerun a query that feeds another query?

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
__________________
CJ_London
_______________________
A little thanks goes a long way. If you have found this post useful, please tick the thanks button
CJ_London is offline   Reply With Quote
The Following User Says Thank You to CJ_London For This Useful Post:
thardyjackson (07-09-2013)
Old 07-09-2013, 06:45 AM   #3
Brianwarnock
Retired
 
Brianwarnock's Avatar
 
Join Date: Jun 2003
Location: Merseyside England
Posts: 12,701
Thanks: 39
Thanked 539 Times in 521 Posts
Brianwarnock is a glorious beacon of light Brianwarnock is a glorious beacon of light Brianwarnock is a glorious beacon of light Brianwarnock is a glorious beacon of light Brianwarnock is a glorious beacon of light Brianwarnock is a glorious beacon of light
Re: Do I need to rerun a query that feeds another query?

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

__________________
What is this life if, full of care,
We have no time to stand and stare

I do not have Access these days 2015
Brianwarnock is offline   Reply With Quote
The Following User Says Thank You to Brianwarnock For This Useful Post:
thardyjackson (07-09-2013)
Old 07-09-2013, 07:38 AM   #4
thardyjackson
Newly Registered User
 
Join Date: May 2013
Location: Nairobi, Kenya
Posts: 45
Thanks: 23
Thanked 0 Times in 0 Posts
thardyjackson is on a distinguished road
Re: Do I need to rerun a query that feeds another query?

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?


Quote:
Originally Posted by CJ_London View Post
....unless you have made changes such as bringing through another field or changing a calculation
thardyjackson is offline   Reply With Quote
Old 07-09-2013, 07:55 AM   #5
CJ_London
Super Moderator
 
Join Date: Feb 2013
Location: UK
Posts: 11,334
Thanks: 40
Thanked 3,670 Times in 3,538 Posts
CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light
Re: Do I need to rerun a query that feeds another query?

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

__________________
CJ_London
_______________________
A little thanks goes a long way. If you have found this post useful, please tick the thanks button
CJ_London is offline   Reply With Quote
The Following User Says Thank You to CJ_London For This Useful Post:
thardyjackson (07-09-2013)
Reply

Tags
query , reports , subquery

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Rerun Query SuperSlick Queries 3 03-21-2013 03:49 AM
Code to run/rerun progress bar thisisanemergency Modules & VBA 5 11-09-2012 07:36 AM
Rerun report from command button? miamiTed Reports 3 11-05-2012 05:31 AM
Determine the query that feeds the form Victor70 Forms 54 11-29-2011 07:27 AM
Query that feeds a form? Profector Forms 2 05-18-2009 07:52 PM




All times are GMT -8. The time now is 01:14 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World