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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

E-mail specific Report Pages if possible?

Status
Not open for further replies.

SyBeerianTyGRRRR

Technical User
Jul 16, 2003
31
0
0
GB
Can anyone tell me how to adapt the following code to only send the report page/pages relevant to the currently visible record in my form. The code below unfortunately attaches the entire report of many pages in length and if possible i want to avoid this as it makes the e-mail message too large. I tried to point the code towards the primary key text box called [AddressID] in the hope that this would select only the current record, but this just enters the exact text "[AddressID] = 1" in the To box in Outlook. The code i currently have is as follows:

===========================================================

Private Sub MailReportbtn_Click()
On Error GoTo Err_MailReportbtn_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "rptPlmkrsInfSheet"
stLinkCriteria = "[AddressID] = " & Me.AddressID

DoCmd.SendObject acReport, stDocName, acFormatSNP, stLinkCriteria

Exit_MailReportbtn_Click:
Exit Sub

Err_MailReportbtn_Click:
MsgBox Err.Description
Resume Exit_MailReportbtn_Click

End Sub

===========================================================

Obviously "rptPlmkrsInfSheet" is the report in question. I have a text box on the form called [EmailAddress] that contains the e-mail address for the current record. I need to use Snapshot format because the report pages i am sending contain bitmap images that do not display in rtf or other formats.

Any assistance would be very gratefully received.

Thanks in advance......
 
Is there no-one out there that can give me any clue as to how to achieve this. Even if someone can confirm that what i am trying to do is either impossible or massively complex i would be grateful.

Thanks v. much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top