T
tvh
I have the following code for sending a report via email. My question is,
how do I replace the email SUBJECT with a specific field in the report?
Obviously, I'm emailing invoices and I would like the email subjects to say
"Invoice W-xxx", whereas the specific field that I would like to point to
only has a "W-xxx" in it. So, the code for the subject would have to be
something like "Invoice" & " " & [this is where i get lost].
Private Sub emailinvoice_Click()
On Error GoTo Err_emailinvoice_Click
Dim stDocName As String
stDocName = "Invoice"
DoCmd.SendObject acReport, stDocName, acFormatSNP, "TO email address",
"CC email address", "BCC email address", "SUBJECT", "email message", True
Exit_emailinvoice_Click:
Exit Sub
Err_emailinvoice_Click:
MsgBox Err.Description
Resume Exit_emailinvoice_Click
End Sub
Thanks for any help!
how do I replace the email SUBJECT with a specific field in the report?
Obviously, I'm emailing invoices and I would like the email subjects to say
"Invoice W-xxx", whereas the specific field that I would like to point to
only has a "W-xxx" in it. So, the code for the subject would have to be
something like "Invoice" & " " & [this is where i get lost].
Private Sub emailinvoice_Click()
On Error GoTo Err_emailinvoice_Click
Dim stDocName As String
stDocName = "Invoice"
DoCmd.SendObject acReport, stDocName, acFormatSNP, "TO email address",
"CC email address", "BCC email address", "SUBJECT", "email message", True
Exit_emailinvoice_Click:
Exit Sub
Err_emailinvoice_Click:
MsgBox Err.Description
Resume Exit_emailinvoice_Click
End Sub
Thanks for any help!