Re: email report per record



On my website (www.rogersaccesslibrary.com), is a couple of Access database
samples called "EmailingSpecificReports.mdb" and
"EmailingSpecificReportsWOutlook.mdb" which illustrate how to do this.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L


"dchristo" <dchristo@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:60350879-7ED2-497D-BB8A-1D9E8470E4FE@xxxxxxxxxxxxxxxx
I am trying to email a report.

On my form I have a button that the user will click - this will send a
report based on the record shown on the form.

Private Sub Sheet1_Click()
Dim strMessage As String 'Body of message
Dim strSubject As String 'Email Subject
Dim strTo As String 'To address
Dim strCC As String 'CC Address
Dim strBCC As String 'BCC Address
Dim stDocName As String
Dim strWhere As String

strWhere = "[id number] = " & Me.[id Number]
stDocName = "Info Form"
strTo = "email@xxxxxxx"
strCC = ""
strBCC = ""
strSubject = "New request placed - " & Me.[id Number]
strMessage = "If you have any questions, please me at the above email
address."

DoCmd.SendObject acReport, stDocName, acFormatSNP, strTo, , ,
strSubject, strMessage, False

However, it is emailing every single record in the database, how do I send
just the current record that is showing on the form?


.