Query Refresh?

rschmidt32

New member
Local time
Today, 07:50
Joined
Apr 18, 2010
Messages
9
With the assistance of a few members on this forum, I have made tremendous progress in creating a customer database that provides the required reporting,inquiries, etc.

At this time, I am experiencing an issue that I need to resolve. Here is the story:

I have numerous forms that pass data to queries that eventually are used to create reports. All of the forms use the same table as the primary source.

If I access one of the forms, the selection data is passed to the query and the report is generated. If I wish to rerun that form to provide a different selection, I have to 'X' out of the previously generated report, because if I do not, the previous data selection remains in the query.

How can I 'refresh' the query criteria each time that I execute the form without having to 'X' out of the current report?

Thanks!
 
With the assistance of a few members on this forum, I have made tremendous progress in creating a customer database that provides the required reporting,inquiries, etc.

At this time, I am experiencing an issue that I need to resolve. Here is the story:

I have numerous forms that pass data to queries that eventually are used to create reports. All of the forms use the same table as the primary source.

If I access one of the forms, the selection data is passed to the query and the report is generated. If I wish to rerun that form to provide a different selection, I have to 'X' out of the previously generated report, because if I do not, the previous data selection remains in the query.

How can I 'refresh' the query criteria each time that I execute the form without having to 'X' out of the current report?

Thanks!

I have always have my form check to see if the report is already opened. If it is, then close the report before opening it.


*** Disclaimer - the following is untested - only a suggestion to try ***
You might be able to have your for check to see if the report is already opened. If is is already opened, you can use VBA code to change the report's record source to the exact same current record source. This might cause the report to "requery" and generate the report again.

Note: because of the was reports work, I would recommend closing the report.
 
Due to buffering issues, I would go with the "close it before you re-open it" approach.
 

Users who are viewing this thread

Back
Top Bottom