Report Print Anomaly

R

Rotata

Ok, maybe a new subject will attract attention.

Good Morning!

Background:
I am running Access 2003 on a Dell Optiplex with 1 gig of ram.
I've constructed a complex database that does quite a lot. The VBA is either
borrowed or wizard generated. (I can manipulate VBA, but not create it.) The
backend is on a server and each user has a personal front end.

One of the many reports I've created is a business card template. The
borrowed code allows the user to insert starting position and number of cards
(usually 10) and print. The report prints to a Canon color laser.

Anomoly:
So, here is the problem. Why is it that *sometimes*, although the report
preview shows 10 perfect cards, it only prints 1?

Also, *sometimes*, when printing cards for more than one employee, it will
print
11 for the first name.


TIA!
 
B

bcap

I did see this the 1st time you asked but I didn't reply because I don't
know the answer - and I suspect it's the same for everyone else!

But, I can make a general comment. If a report has code behind it (say, in
the Detail_Format event procedure), that code will run when the report is
previewed, and it will run *again* when the report is printed. In other
words, when you print a report from a report preview, it doesn't just print
the image of what you see on the screen, it generates the report all over
again.

Which is usually all well and good, *but* if the code uses module-level
variables (or even, horrors, static variables) then, because the report
object doesn't get closed and re-opened between the preview and the print,
the variables don't get re-initialised, so what you have when the report
*starts printing* is whatever values the variables had when the report
*finished previewing*.

This is the usual cause of reports printing differently to how they
previewed. For more detailed advice on what might be your problem, you're
gonna have to post the code.
 

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