var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Send Object with Filter
I am have a report filtered by a form select using the code below:
Private Sub preview_Click()
On Error GoTo Err_preview_Click
Dim stDocName As String
strWhichFilter = "SALES_ID = Forms![frm_RepsSelect]!SalesRep"
stDocName = "rpt_SalesResultsSummary_PDA"
DoCmd.OpenReport stDocName, acPreview, , strWhichFilter
What I now want to do is create a send object in HTML format to send this report to each rep. How can I apply the same filtering as above to achieve this.
Any assistance would be appreciated.
Make your Report RecordSource a query, qryReport. Then you can set the SQL property before opening the report or using the SendObject method:
qryReport.SQL = "SELECT... FROM... WHERE (((SALES_ID)=" & Forms![frm_RepsSelect]!SalesRep & "));"
Thank you for your assistance, much appreciated.