E-MAIL TWO REPORTS THROUGH SAME COMMAND BUTTON

  • Thread starter jschweitzer via AccessMonster.com
  • Start date
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
 
G

Guest

SendObject I do believe, will not accept two attachments.
You could however send two emails each with one report attached to it and
both from the same command button.
 
J

jschweitzer via AccessMonster.com

How would I go about doing this? Would I use the event procedure that I
started with and modify to perform this function?

Jan
 

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