Guest_imported
New member
- Jan 1, 1970
- 0
I would like to add a print dialog to my program. Everything seems to be going alright with the exception of the Cancel button. Below is the code I used:
frmMain.dlgCompany.CancelError = True
On Error GoTo ErrorHandler
dlgCompany.Action=5
dlgCompany.PrinterDefault= true
rptEE.CopiesToPrinter=2
rptEE.CopiesToPrinter=dlgCompany.Copies
rptEE.Destination = crptToPrinter
rptEE.Connect = g_sRptConnect
rptEE.Action = 1
Exit Sub
ErrorHandler:
'User presses cancel
Exit Sub
This process is being used to print Checks that were designed using Seagate Crystal Report Designer. However when I press the cancel button, I still get the Cancel by user error. Is there something missing from the code?
Thanks,
Cooleen
frmMain.dlgCompany.CancelError = True
On Error GoTo ErrorHandler
dlgCompany.Action=5
dlgCompany.PrinterDefault= true
rptEE.CopiesToPrinter=2
rptEE.CopiesToPrinter=dlgCompany.Copies
rptEE.Destination = crptToPrinter
rptEE.Connect = g_sRptConnect
rptEE.Action = 1
Exit Sub
ErrorHandler:
'User presses cancel
Exit Sub
This process is being used to print Checks that were designed using Seagate Crystal Report Designer. However when I press the cancel button, I still get the Cancel by user error. Is there something missing from the code?
Thanks,
Cooleen