Elwood
Four Fried Chickens
- Local time
- Today, 03:20
- Joined
- Jul 13, 2004
- Messages
- 5
I am trying to email one record as a PDF attachment. Below is the code I’m using. The problem is it puts every record into the PDF. At one time I had the same problem while printing I was able to print one record by using the ID field to print one record at a time:
DoCmd.OpenReport stDocName, acViewNormal, , "[ID]=" & Me![ID]
Any help is greatly appreciated.
Private Sub cmdBolo_Click()
On Error GoTo Err_cmdBolo_Click
Dim stDocName As String
Dim stMsg As String
Dim stAddress As String
stMsg = "See Attachment
stDocName = "rptBoloMain"
stAddress = "elwood@medo.com"
DoCmd.OpenReport stDocName, acPreview
DoCmd.SendObject acSendReport, stDocName, acFormatPDF, stAddress, , , "BOLO Test", stMsg, True
Exit_cmdBolo_Click:
Exit Sub
Err_cmdBolo_Click:
MsgBox Err.Description
Resume Exit_cmdBolo_Click
End Sub
DoCmd.OpenReport stDocName, acViewNormal, , "[ID]=" & Me![ID]
Any help is greatly appreciated.
Private Sub cmdBolo_Click()
On Error GoTo Err_cmdBolo_Click
Dim stDocName As String
Dim stMsg As String
Dim stAddress As String
stMsg = "See Attachment
stDocName = "rptBoloMain"
stAddress = "elwood@medo.com"
DoCmd.OpenReport stDocName, acPreview
DoCmd.SendObject acSendReport, stDocName, acFormatPDF, stAddress, , , "BOLO Test", stMsg, True
Exit_cmdBolo_Click:
Exit Sub
Err_cmdBolo_Click:
MsgBox Err.Description
Resume Exit_cmdBolo_Click
End Sub