when i press cancel button.it still prints.Kindly let me know .any help would be Highly appreciated.here is the following code what i have written.
Private Sub btPrint_Click()
Dim frm As IspecialForm
Set frm = Me.ActiveForm
frm.GetTextBoxInvisible
frm.Refresh
'CommonDialog1.Flags = cdlPDReturnDC + cdlPDNoPageNums
CommonDialog1.Action = 5
CommonDialog1.PrinterDefault = True
CommonDialog1.CancelError = True
CommonDialog1.Orientation = cdlPortrait
CommonDialog1.ShowPrinter
frm.PrintForm
Printer.EndDoc
frm.SetStartDesign
End Sub