Xenix
Registered User.
- Local time
- Today, 00:45
- Joined
- Oct 8, 2001
- Messages
- 124
I have a problem with emailing a report, if I want to view a report quotation I use the code:
Private Sub Preview_Click()
On Error GoTo Err_Preview_Click
DoCmd.Save acForm, "Quotation"
DoCmd.OpenReport "QuotationEMail", acPreview, "", "
Private Sub Preview_Click()
On Error GoTo Err_Preview_Click
DoCmd.Save acForm, "Quotation"
DoCmd.OpenReport "QuotationEMail", acPreview, "", "
=[Forms]![Quotation]!"
Exit_Preview_Click:
Exit Sub
Err_Preview_Click:
MsgBox Err.Description
Resume Exit_Preview_Click
End Sub
But if I want to email the report I use:
Private Sub Command42_Click()
On Error GoTo Email_Err
DoCmd.Save acForm, "Quotation"
DoCmd.SendObject acSendReport, "QuotationEMail", acFormatRTF, Me.Emailaddress, , , "Quotation", "Please find attached quotation:", True
Email_Err:
MsgBox "Email Not Sent", , "EMAIL ALERT"
End Sub
See my problem? I don't know where to put the "=[Forms]![Quotation]!" on the SendObject command?
anyone know how to do this?
many thanks
Mike