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

Run report in batch or background

Status
Not open for further replies.

MushMouse

Programmer
Mar 29, 2004
65
US
I am assigning a printer & issuing a command to print a 1 page report using the code below.
There is a 10 second delay while I wait for the report to print. Is there a way to have the report print in batch or background mode so I can continue working while the printer/report is set up & prints? I know 10 seconds doesn't seem like a lot, but if I want to choose 10 invoices, it's almost 2 minutes that I have to just watch the screen .....

DoCmd.OpenReport "Invoice Report", acViewDesign
If IsNull(PrinterList) Then
Reports![Invoice Report].UseDefaultPrinter = True
Else
For Each prn In Application.Printers
If prn.DeviceName = PrinterList Then
Set Application.Printer = prn
Exit For
End If
Next prn
End If
DoCmd.Close acReport, "Invoice Report", acSaveNo
DoCmd.OpenReport "Invoice Report", acViewPreview
DoCmd.PrintOut , , , , NumOrig
DoCmd.Close acReport, "Invoice Report"
 
Why opening the report in preview mode ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Sorry - I got called onto an emergency project & wasn't able to get back to this til now.

Anyhow, I don't remember why I opened in preview originally, so I just took out acViewPreview, but got the same result - the system hangs until the report prints. Any suggestions how to get around this?
 
Is it possible that your printer settings are set to "print direct to printer"?

It sounds like the print data is not going through your print queue, but direct to the printer. This will not release the system for new threads until printing is complete.
 
I just checked. My printer setting are not set to "print direct to printer" . They are set to "Spool print dicuments so program finishes printing faster"

Any other suggestions would be appreciated!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top