email 2 reports

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.
 
L

Larry Daugherty

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top