G
Guest
I'm trying to email a report based on the current record (you'd think there'd
be a wizard for sending ONLY the current record; I mean, who sends every
Invoice every time?). I've used the code below along with several
variations, but still can't seem to send only the current record. Any help
with the code would be appreciated.
Notes:
"Invoice" is the name of the report.
"frmWorkOrder" is the name of the form with the "EmailInvoice" command button.
"tblwoWorkOrder#" is the field name (and primary key)
"acFormatSNP" is the abbreviation for sending a Snapshot format (right?)
Private Sub EmailInvoice_Click()
On Error GoTo Err_EmailInvoice_Click
Dim stDocName As String
stDocName = "Invoice"
DoCmd.SendObject acReport, [Forms]![frmWorkOrder]![tblwoWorkOrder#],
acFormatSNP, "(e-mail address removed)", "", "", "testing...",
"testing,testing", True
Exit_EmailInvoice_Click:
Exit Sub
Err_EmailInvoice_Click:
MsgBox Err.Description
Resume Exit_EmailInvoice_Click
End Sub
be a wizard for sending ONLY the current record; I mean, who sends every
Invoice every time?). I've used the code below along with several
variations, but still can't seem to send only the current record. Any help
with the code would be appreciated.
Notes:
"Invoice" is the name of the report.
"frmWorkOrder" is the name of the form with the "EmailInvoice" command button.
"tblwoWorkOrder#" is the field name (and primary key)
"acFormatSNP" is the abbreviation for sending a Snapshot format (right?)
Private Sub EmailInvoice_Click()
On Error GoTo Err_EmailInvoice_Click
Dim stDocName As String
stDocName = "Invoice"
DoCmd.SendObject acReport, [Forms]![frmWorkOrder]![tblwoWorkOrder#],
acFormatSNP, "(e-mail address removed)", "", "", "testing...",
"testing,testing", True
Exit_EmailInvoice_Click:
Exit Sub
Err_EmailInvoice_Click:
MsgBox Err.Description
Resume Exit_EmailInvoice_Click
End Sub