How to Email current record only

sflsan

New member
Local time
Today, 03:42
Joined
Jun 18, 2007
Messages
1
I have searched through the forum, and what I found either didn't pertain to the way I was doing it, or was more complex than what I'm needing. I have a form that displays all relevant information for one record at a time. I have created an email button, and this is what I have so far:

DoCmd.SendObject acSendReport, "INS", acFormatRTF, , , , "Inspection Order"

It works fine, but it sends every entry to the report and generates over 20 pages of a report. What I want is when I click the email button, that it generates a report with the current record only. I have done this successfully with an automated print function, but the email function doesn't seem to have the same WhereCondition option I used on the print function. I am looking for the simplest and most automated way of doing this.
 
In the query Criteria (for RecordID) put [forms]![frm_name]![RecordID] that will select only the data relevant to the RecordID for the record currently displayed in the form.
 
I seem to remember reading somewhere that you can open the report for preview, using the WhereCondition, just prior to your sendobject code and that this will do the trick.
 

Users who are viewing this thread

Back
Top Bottom