View Full Version : Email snapshot of Report


craigcain
02-14-2008, 05:22 AM
Hi there,

I use a form to input data or orders and have a command button which takes the current record and attaches a snapshot of it to an email. I can currently view all records that I have entered by using the arrows at the bottom of the form. I would like to still be able to do this if possible.

The problem is that if for example I have 5 records then the attached snapshot will have 5 copies of the same record instead of just one. This could cause problems if there were 200 records as the attached file would be huge.

Is there a way to make sure that only one copy of the record is attached regardless of how many records there are?

Private Sub cmdMail_Click()
On Error GoTo Err_cmdMail_Click

Dim stDocName As String

stDocName = "Report Name"
DoCmd.SendObject acSendReport, "Report Name", "Snapshot Format", , , , "Order Confirmation", "Message Text"

Exit_cmdMail_Click:
Exit Sub

Err_cmdMail_Click:
MsgBox Err.Description
Resume Exit_cmdMail_Click



End Sub

Hope that wasnt too confusing!

Thanks in advance for any help