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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report printing-how to hide the grey screen

Status
Not open for further replies.

lizray

Programmer
May 14, 2008
126
AU
I am printing a report, and first open it in Printpreview,hidden and then specify the printer, and then open in Normal view to actually print the report. This works ok, but while this is going on, I would like the screen to display the form that initiated the printing. At the moment, the screen goes Grey, I think while in printpreview mode. Is there a way to avoid or minimise this
my code:
DoCmd.OpenReport strReport, acViewPreview, , , acHidden
With Reports(strReport)
Set .Printer = Application.Printers(strPrinterName)
End With
With Reports(strReport).Printer
.Duplex = acPRDPSimplex
.PaperBin = intBinID
End With
DoCmd.OpenReport strReport, acViewNormal
DoCmd.Close acReport, strReport
 
You could use the setfocus method of the form to put it back on top... Although I think your printing is showing the report... so either acHidden works to print it too or you'd have to look at printing the report from a report object. Can't say I've done it but check for a print method.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top