By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,680 Members | 1,890 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,680 IT Pros & Developers. It's quick & easy.

e-mailing a single record in a report

P: n/a
Hello, I'm looking for Allen.

I hate to bother you again, but I am now trying to e-mail the single
record from the same form mentioned before (using a macro button) (reference
thread about printing a single record in a report form - worked great, thanks!

I found some previous advice you provided on the same subject and came up

Private Sub cmdEmail_Click()
If IsNull(Me.ID) Or IsNull(Me.Email) Then
MsgBox "Need ID and email"
gstrReportFilter = "Record ID = " & Me.Record_ID
DoCmd.SendObject acSendReport, "rpt Worksheet e-mail", "FormTyp",
acFormatHTML, "xy*", "xy*", , "Company Name"
Me.Email , True
End If
End Sub

When I run this, I get "Compile error: Invalid use of Me keyword" and it
highlights the first reference of "ME".

Also, in the subject line, how do I get it to enter the data from one of the
fields in the report? if possible.

Thanks in advance,
Newbie aka Valarie

Message posted via

Apr 9 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.