>>Hi everybody,
>>
>>Can a call to GetPrinter() function produce 'Printer not ready' error?
>>
>>Thanks in advance.
>
>
http://www.ml-consult.co.uk/foxst-14.htmThanks. From that page:
What would happen if a user runs my application on a computer that has no printer driver installed?
One or more run-time errors will be generated whenever the application tries to perform a printer-related task. The errors will typically be "Printer not ready", "Error loading printer driver", or both. They will occur when the application tries to print a report, and also when you execute SET PRINTER, GETPRINTER() and several similar commands and functions. You can, however, successfully preview a report.
To prevent these run-time errors, test the value returned from APRINTERS() before performing a printer-related task. If this value is zero, it means that no printer drivers are installed.I may add this check just in case. The strange thing is that the user reported an error in the previous version of the application and not in the new one and I'm sure the code is the same.
Is it possible to get this error when there are printers installed?
If it's not broken, fix it until it is.
My Blog