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

Printer Error 1

Status
Not open for further replies.

ChrisAgius

Programmer
Sep 27, 2000
51
MT
I was testing this code ..... and every time it gave the same error !!


SET PRINTER ON
S = GETPRINTER()
SET PRINTER TO NAME S
REPORT FORM ... TO PRINTER NOCONSOLE


AND EVERYTIME AN ERROR OCCURED !!!


ERROR -- ERROR ACCESSING PRINTER SPOOLER

Can Someone Help by giving me some source code on how to select a printer (Non-Default)

THanks A Lot Guys

[sig][/sig]
 
ChrisAgius

SET PRINTER ON
S = GETPRINTER()
SET PRINTER TO NAME (S)
REPORT FORM ... TO PRINTER NOCONSOLE

Chris
[sig][/sig]
 
Another Error Resulted from your solution .....


ERROR ---- ERROR ACCESSING PRINTER SPOOLER


Can anyone help ?
 
SET PRINTER ON
S = GETPRINTER()
SET PRINTER TO NAME (S)
REPORT FORM ... TO PRINTER NOCONSOLE



?/????

Chris
 
Error

Is REPORT FORM ... TO PRINTER NOCONSOLE the exact code you are using?

Chris



[sig][/sig]
 
No ... is the name of the form Eg : Stocks

 
Try replacing all 4 lines of code with this one line. Please note the repositioning of the noconsole parameter.

report form xxx [red]noconsole[/red] to printer [red]prompt[/red]

If you still get the spooler error look into your windows printer ports and print drivers.

[sig]<p>David W. Grewe<br><a href=mailto:Dave@internationalbid.net>Dave@internationalbid.net</a><br>[/sig]
 
David's one line code is more elegant than the original three line code supplied. (SET PRINTER ON is not needed)

If you want the user to have a choice of printer selection only, use the three line version.

If you want the user to have a choice of printer selection, copies to print and print range, use the one line version.

Chris

[sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top