E
excyauseme
Guys this is driving me crazy. I have an Access 2003 mdb with several
RunCommands that have error trapping to handle when the user Cancels a
dialog box. This used to work before all of the latest office 2003
security upgrades. Maybe I'm just not seeing a problem that's so easy
it's going to be totally embarrassing. But I've had this happen to
acCmdPrint as well as acSendReport. Can anyone offer some advice, or
let me know if they've had an issue recently. I will post part of my
code here:
Sub printing(i)
On Error GoTo HandleError
Dim DocName As String
DocName = "rptMiscReports"
<snip snip >
DoCmd.OpenReport DocName, View:=acViewPreview, WindowMode:=acHidden
DoCmd.RunCommand acCmdPrint
DoCmd.Close acReport, DocName
HandleExit:
Exit Sub
HandleError:
Select Case Err.Number
Case 2501 'in case of cancel
Resume Next
Case Else
MsgBox Err.Number & ": " & Err.Description
End Select
Resume HandleExit
End Sub
RunCommands that have error trapping to handle when the user Cancels a
dialog box. This used to work before all of the latest office 2003
security upgrades. Maybe I'm just not seeing a problem that's so easy
it's going to be totally embarrassing. But I've had this happen to
acCmdPrint as well as acSendReport. Can anyone offer some advice, or
let me know if they've had an issue recently. I will post part of my
code here:
Sub printing(i)
On Error GoTo HandleError
Dim DocName As String
DocName = "rptMiscReports"
<snip snip >
DoCmd.OpenReport DocName, View:=acViewPreview, WindowMode:=acHidden
DoCmd.RunCommand acCmdPrint
DoCmd.Close acReport, DocName
HandleExit:
Exit Sub
HandleError:
Select Case Err.Number
Case 2501 'in case of cancel
Resume Next
Case Else
MsgBox Err.Number & ": " & Err.Description
End Select
Resume HandleExit
End Sub