email 2 reports

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
this code
stDocName = "Report 1"
stDocName = "Report 2"
leaves stDocName with "Report 2".

I don't use Access as a mail manager so don't know what's required
maybe something like:
stDocName = "Report 1" & "; " & "Report 2"

HTH
 
Back
Top