I just put the following together, it should do the trick
Function Check4Printer(sPrinterName As String) As Boolean
On Error GoTo Error_Handler
Dim prtAvailPrinters As Printer
Check4Printer = False
For Each prtAvailPrinters In Application.Printers
With prtAvailPrinters
If sPrinterName = .DeviceName Then Check4Printer = True
End With
Next prtAvailPrinters
Error_Handler_Exit:
On Error Resume Next
Exit Function
Error_Handler:
MsgBox "MS Access has generated the following error" & vbCrLf & vbCrLf &
"Error Number: " & _
Err.Number & vbCrLf & "Error Source: Check4Printer" & vbCrLf & "Error
Description: " & _
Err.Description, vbCritical, "An Error has Occured!"
Resume Error_Handler_Exit
End Function
--
Hope this helps,
Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples:
http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.