Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to email a specific report?

Status
Not open for further replies.

OverDrive

IS-IT--Management
Dec 11, 2000
268
US
I know I have done this before, but all my documentation is at work . . . I am trying to email a report with a subject line and I would like to send it with a condition of [ID] so it only prints the current record I am on . . .

this is what I got . . . where am I going wrong?

DoCmd.DoMenuItem acFormBar, acRecordsMenu, 2, , acMenuVer70
stDocName = "rpt_traineeprogressreport"
DoCmd.SendObject acReport, stDocName, , "[ID] = " & Me.ID

(, , "[ID] = " & Me.ID) I know this part is wrong, but I am not sure where to put the condition at?

Any Ideas?
Thanks~
Chance~
 
I figured it out . . .

If anyone needs to know . . . here is an exmple, just replace your report with my report name and u got it . . .

Dim stDocName As String
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
stDocName = "rpt_traineeprogressreport"
DoCmd.OpenReport "rpt_traineeprogressreport", acPreview, , "[ID] = " & Me.ID

stDocName = "rpt_traineeprogressreport"
DoCmd.SendObject acReport, stDocName


Chance~
 
Does anyone know how I would add a subject line to the email?

I tried to follow the format, but got lost . . . this is what I got.


Dim stDocName As String
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
stDocName = "rpt_traineeprogressreport"
DoCmd.OpenReport "rpt_traineeprogressreport", acPreview, , "[ID] = " & Me.ID

stDocName = "rpt_traineeprogressreport"
DoCmd.SendObject acReport, stDocName, , , , ,"Here is your Progress Report"



Any Ideas?
Thanks
Chance~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top