B
Brian Appleberry
I had the following code in a database that would open a
report and create a snapshot of that report and put it
into an e-mail that worked fine for Access XP and prior.
Since upgrading to Access 2003, this code seems not to
work. Can someone please help. Is there modification to
the code that I need to change or is there a change in
Access 2003 that I need to make.
Private Sub ProcessData_Exit(Cancel As Integer)
On Error GoTo Err_ProcessData_Exit
Dim stDocName As String
Dim strReqNo As String
Dim Email As String
stDocName = "rptReqIT"
strReq = "ReqNo = Forms![frmReqHeaderIT]!ReqNo"
DoCmd.OpenReport stDocName, acViewPreview, , strReq
DoCmd.Maximize
Email = Me![VendorAggregate]
DoCmd.SendObject _
ObjectType:=acSendReport, _
ObjectName:=adhcReportName, _
OutputFormat:=acFormatSNP, _
Subject:="Purchase Requisition # " ' + Email ' _
Exit_ProcessData_Exit:
Exit Sub
Err_ProcessData_Exit:
Resume Exit_ProcessData_Exit
End Sub
report and create a snapshot of that report and put it
into an e-mail that worked fine for Access XP and prior.
Since upgrading to Access 2003, this code seems not to
work. Can someone please help. Is there modification to
the code that I need to change or is there a change in
Access 2003 that I need to make.
Private Sub ProcessData_Exit(Cancel As Integer)
On Error GoTo Err_ProcessData_Exit
Dim stDocName As String
Dim strReqNo As String
Dim Email As String
stDocName = "rptReqIT"
strReq = "ReqNo = Forms![frmReqHeaderIT]!ReqNo"
DoCmd.OpenReport stDocName, acViewPreview, , strReq
DoCmd.Maximize
Email = Me![VendorAggregate]
DoCmd.SendObject _
ObjectType:=acSendReport, _
ObjectName:=adhcReportName, _
OutputFormat:=acFormatSNP, _
Subject:="Purchase Requisition # " ' + Email ' _
Exit_ProcessData_Exit:
Exit Sub
Err_ProcessData_Exit:
Resume Exit_ProcessData_Exit
End Sub