send an object as an attachment

K

Karen

Hi,

I would like to send a pdf attachment of a report of a current record. I
have created a report based on a form. I am able to open the report to
display the current form record. I am also able to send a report of all of
the records as a pdf email attachment. Is there a way to send the current
record only as a report?

This is the code I have which sends the entire report.

Private Sub cmdPrintCurrentRecord_Click()
Dim StrWhere As String
StrWhere = "[Issue_fk]=" & Me.issueID
DoCmd.SendObject acSendReport, "nameofreport", , "emailaddress"
 
J

Jacinda

I'm not one of the MVPs but I do something similar with my AR reports that I
send to clients...

The easiest way I found was to change the query. Your critera should point
to your form. For instance this will filter my query based upon the customer
code I have open on the screen so when I go to send my report it will only
send the invoices associated with the customer code showing.
WHERE (((QueCurrent.[Client #])=[Forms]![frmSearch]![CC]))

I hope that helps.
-- Jacinda
 

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