Thank you to you both, the users are used to having a command that prints
automatically, so they don't usually see the preview, I tried putting in the
DoCmd.OpenReport in the OnClose, however, since the report is open, it errors
out. Just thought this would be a nice to have. Perhaps a dialogue box that
pops up on close.. "Do you wish to print? Y/N" On Yes, print, on No,
close. Hmm, that may work, I would have to close the report first, but the
report data is being pulled from a temp table anyways, so the data would
still be there.
Larry Linson said:
I agree with fredg. My users have always appreciated having reports
presented in preview so they could look them over before printing. Then, if
they noted a discrepancy, they could close the preview, do what was
necessary to correct it, and then redisplay and print.
If you take that control away from the user, then there will be times that
they print a report that has to be reprinted later, after some error has
been corrected.
That said, I see no reason why you can't issue a DoCmd.OpenReport in the
Close event, with the appropriate option to print, if you feel compelled to
do so -- but I still don't think it is A Good Idea.
Larry Linson
Microsoft Access MVP