Printing Preview Doesnt Match the Printed Report

  • Thread starter ianc via AccessMonster.com
  • Start date
I

ianc via AccessMonster.com

I have a problem printing reports in Access when the printing process is
performed in a loop.
The VBA code selects all the reports
(about 25 reports each with one page)into an array and then loops through
the list assigning data/tables to the report, then printing and then
closing the report (all on sequential lines of VBA). However the print
preview of each report (which shows Headers and Detail) does not always
match the actual printed report (which spiradically only shows the Detail
section). What is really frustrating is that the loop can be run several
times with different printing results i.e. some reports print as per the
preview while others dont (missing headers); And, its not always the same
report. I've found if I add a pause of about 50 secs between each report is
usually fixes the problem however this obviously means the printing process
takes alot longer!)

I'm cant figure out whether this is an Access problem or a printer problem.
Has anyone else experienced this problem?

Thanks,
 
M

Marshall Barton

ianc said:
I have a problem printing reports in Access when the printing process is
performed in a loop.
The VBA code selects all the reports
(about 25 reports each with one page)into an array and then loops through
the list assigning data/tables to the report, then printing and then
closing the report (all on sequential lines of VBA). However the print
preview of each report (which shows Headers and Detail) does not always
match the actual printed report (which spiradically only shows the Detail
section). What is really frustrating is that the loop can be run several
times with different printing results i.e. some reports print as per the
preview while others dont (missing headers); And, its not always the same
report. I've found if I add a pause of about 50 secs between each report is
usually fixes the problem however this obviously means the printing process
takes alot longer!)

I'm cant figure out whether this is an Access problem or a printer problem.
Has anyone else experienced this problem?


Are these reports really the same port with different data?

If so, it's a timing issue. Your code keeps on running
while Access is tring to find time to process a report.
This means that your code is trying to open the report again
before Access has finished processing the previous report.
Combine that scenario with the fact that OpenReport only
passes the focus to the report if it's already open and your
code will not be operating on the report you think it is.

If that's not what you're doing then please explain with
more details about what you are doing.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top