J
Jedster
Does anyone know how to send a report object in rtf format with criteria gathered from a dialog box
I started with the following code to use criteria from a dialog box to generate the report
Dim ReportNam
ReportName = "rptDiscontinuedCatalogue
DoCmd.OpenReport
ReportName:=ReportName,
View:=acViewPreview,
WhereCondition:="Department<>'94'" &
"AND SC<99 AND St='D' AND DiscDate Between #" &
Format$(Me.StartDate, "mm/dd/yyyy") & "# AND #" &
Format$(Me.EndDate, "mm/dd/yyyy") & "#
and I know that I could use the following code to mail the report
DoCmd.SendObject objecttype:=acSendReport, ObjectName:="rptDiscontinuedCatalogue", To:="Joe Bloggs", Subject:="Subject", MessageText:="This is a test", EditMessage:=Tru
....however, I am so far unable to combine the two to produce the desired result
I have recently been advised to set the criteria on the report's On Open event, but am unsure of the correct command to use
Your help will be appreciated.
I started with the following code to use criteria from a dialog box to generate the report
Dim ReportNam
ReportName = "rptDiscontinuedCatalogue
DoCmd.OpenReport
ReportName:=ReportName,
View:=acViewPreview,
WhereCondition:="Department<>'94'" &
"AND SC<99 AND St='D' AND DiscDate Between #" &
Format$(Me.StartDate, "mm/dd/yyyy") & "# AND #" &
Format$(Me.EndDate, "mm/dd/yyyy") & "#
and I know that I could use the following code to mail the report
DoCmd.SendObject objecttype:=acSendReport, ObjectName:="rptDiscontinuedCatalogue", To:="Joe Bloggs", Subject:="Subject", MessageText:="This is a test", EditMessage:=Tru
....however, I am so far unable to combine the two to produce the desired result
I have recently been advised to set the criteria on the report's On Open event, but am unsure of the correct command to use
Your help will be appreciated.