The following pertains to the code which I wrote for printing a form. Being a very basic application, I used the PrintForm function.
----------
Private Sub cmdprint_Click()
If MsgBox("This will print the report. Make sure your printer is ready and confirm.", vbOKCancel, "Confirm") = vbOK Then
' The visibility of objects in the form is controlled.
Printer.Orientation = vbPRORLandscape
Printer.PaperSize = vbPRPSA4
lbltime.Caption = Format(Now(), "DD/MM/YYYY, HH:MM:SS")
Form3.PrintForm
' The visibility control on objects is released and normalized.
End If
End Sub
----------
This works fine. However, if the PRINT command is given another time without form reload, I get an error "486: Can't print form image to this type of printer."
I would appreciate any help. Thanks :)
----------
Private Sub cmdprint_Click()
If MsgBox("This will print the report. Make sure your printer is ready and confirm.", vbOKCancel, "Confirm") = vbOK Then
' The visibility of objects in the form is controlled.
Printer.Orientation = vbPRORLandscape
Printer.PaperSize = vbPRPSA4
lbltime.Caption = Format(Now(), "DD/MM/YYYY, HH:MM:SS")
Form3.PrintForm
' The visibility control on objects is released and normalized.
End If
End Sub
----------
This works fine. However, if the PRINT command is given another time without form reload, I get an error "486: Can't print form image to this type of printer."
I would appreciate any help. Thanks :)