J
jschweitzer via AccessMonster.com
I have created 2 command buttons (using the wizard) that will attach each
report to separate e-mails. These reports are going to Executive Management
so I am trying to create both .snp attachments to 1 e-mail. I am a newbee
to VB and understand some code. I have tried to combine the Event Procedures
but have come up with only errors. Any help would be appreciated.
The Event Procedure code for the 1st report is as follows:
-------------------------------------
Private Sub SendWeeklySvReport_Click()
On Error GoTo Err_SendWeeklySvReport_Click
Dim stDocName As String
stDocName = "rptWeeklySVs"
DoCmd.OutputTo acReport, stDocName
Exit_SendWeeklySvReport_Click:
Exit Sub
Err_SendWeeklySvReport_Click:
MsgBox Err.Description
Resume Exit_SendWeeklySvReport_Click
End Sub
-----------------------
and for the second report is:
Private Sub WklybyDefect_Click()
On Error GoTo Err_WklybyDefect_Click
Dim stDocName As String
stDocName = "rptWeeklybyDefect"
DoCmd.SendObject acReport, stDocName
Exit_WklybyDefect_Click:
Exit Sub
Err_WklybyDefect_Click:
MsgBox Err.Description
Resume Exit_WklybyDefect_Click
End Sub
report to separate e-mails. These reports are going to Executive Management
so I am trying to create both .snp attachments to 1 e-mail. I am a newbee
to VB and understand some code. I have tried to combine the Event Procedures
but have come up with only errors. Any help would be appreciated.
The Event Procedure code for the 1st report is as follows:
-------------------------------------
Private Sub SendWeeklySvReport_Click()
On Error GoTo Err_SendWeeklySvReport_Click
Dim stDocName As String
stDocName = "rptWeeklySVs"
DoCmd.OutputTo acReport, stDocName
Exit_SendWeeklySvReport_Click:
Exit Sub
Err_SendWeeklySvReport_Click:
MsgBox Err.Description
Resume Exit_SendWeeklySvReport_Click
End Sub
-----------------------
and for the second report is:
Private Sub WklybyDefect_Click()
On Error GoTo Err_WklybyDefect_Click
Dim stDocName As String
stDocName = "rptWeeklybyDefect"
DoCmd.SendObject acReport, stDocName
Exit_WklybyDefect_Click:
Exit Sub
Err_WklybyDefect_Click:
MsgBox Err.Description
Resume Exit_WklybyDefect_Click
End Sub