Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report will not print from preview display

Status
Not open for further replies.
Jul 24, 2000
88
CA
I am working in Access XP and have a report which is opened in a macro following the opening of a parameter screen.

The sequence of actions in the macro is:
OpenForm (with action args: frmReportParameters, View = Form, Data Mode = Edit and Window Mode = Dialog)
OpenReport (with action args: rptCommunicationsCalendar, View = Print Preview, Window Mode normal)
Close (with action arguments Object Type = Form, Object Name = frmReportParameters, Save = No)

The preview of the report appears OK on the screen but if I try to print it from the preview using the print icon or the 'File - Print...', a very short-lived message box appears on the screen (I think it is the printer message box that normally appears) but nothing is printed and nothing is in the print queue!

If I change the OpenReport macro entry View action argument from Print Preview to Print, then running the macro prints out the report OK.

I have had this problem with both reports I have been developing today.

While I was developing this report, I printed a few test runs (before completion) using the print from the preview screen and it worked fine! I am obviously doing something later in the report development that appears to prevent the printing of the report from the preview screen. Does anyone have any ideas?

Thanks for any help you can give...

RjB
 
RichardBott
This is a shot in the dark, but I know that having AutoNameCorrect on can cause problems in a number of areas, and printing is one of them. If you have it on, you might try turning it off and see if that helps.

Tom
 
Thanks for your suggestion Tom. I managed to solve the problem and hear's the scoop:

In my report code, I had referenced an object in the report parameter form code using [Forms]!frmReportParameters... When I replaced this with "Form_frmReportParameters..., the problem was solved! Maybe someone can enlighten me on the subtle difference between these 2 ways of refencing objects outside of a module and how it manifested itself in not being able to physically print the report from the report previewer!

Thanks again for your help.

RjB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top