Solved Prevent report from refreshing

swingline

Member
Local time
Today, 23:40
Joined
Feb 18, 2020
Messages
51
Is there a way to prevent a report with a query as its data source from refreshing when going to print preview or printing?
 
Data on report is but a snapshot of the records at the time the report is displayed/printed. It does not refresh unless you re open it.
 
No. Access runs the recordsource query when you preview the report and it runs it AGAIN when you print the preview specifically to ENSURE the most current values.

What problem is caused by having up to date data in the printed report?
 
it will only refresh if you have Code on Load Or Open event of the Report.
 
No. Access runs the recordsource query when you preview the report and it runs it AGAIN when you print the preview specifically to ENSURE the most current values.

What problem is caused by having up to date data in the printed report?

In this case, I am using the query to randomly generate an exam. The report uses conditional formatting to highlight the answers, so the idea was to allow instructors to print a key if needed, then disable the highlighting to allow the exam to be printed for students. So, in this case, the query running after each print is a bit of a problem.

I just ended up creating a temp table and appending the query results to the table.
 
arne, It would appear that someone fixed that little quirk.

swingline, I guess I'm not sure the problem is. If you prompt for a variable that your code uses to make hignlights and you print, do you not want the highlighting to print?
 

Users who are viewing this thread

Back
Top Bottom