G
Guest
I would like to use a button to output 2 reports to email. I tried the
following code but only one report would be output and attached to the
email:
Private Sub Command306_Click()
On Error GoTo Err_Command306_Click
Dim stDocName As String
stDocName = "Report 1"
stDocName = "Report 2"
DoCmd.SendObject acReport, stDocName, acFormatSNP
Exit_Command306_Click:
Exit Sub
Err_Command306_Click:
MsgBox Err.Description
Resume Exit_Command306_Click
End Sub
--
I tried adding another line of " DoCmd.SendObject acReport, stDocName,
acFormatSNP" but it just ended up opening 2 emails and attaching the
files
seperately. I know there is a way to output them both on the same
email... but don't know how.
following code but only one report would be output and attached to the
email:
Private Sub Command306_Click()
On Error GoTo Err_Command306_Click
Dim stDocName As String
stDocName = "Report 1"
stDocName = "Report 2"
DoCmd.SendObject acReport, stDocName, acFormatSNP
Exit_Command306_Click:
Exit Sub
Err_Command306_Click:
MsgBox Err.Description
Resume Exit_Command306_Click
End Sub
--
I tried adding another line of " DoCmd.SendObject acReport, stDocName,
acFormatSNP" but it just ended up opening 2 emails and attaching the
files
seperately. I know there is a way to output them both on the same
email... but don't know how.