I have tried and tried for days to get this to work. I'm running out of time. CAn some one please help me or give me a good starting point. the code i have below is to filter on a report for each sales rep name in a select query called "salesrepnames". Unfortunately it isn't working. The only way I'm getting it to filter is by placing the filter in the query ">60daytickler" that is the recordsource for the report. I need it to filter the recordsource when I open the report based on each sales rep in another query "salesrepnames". Desperate! the actual report name is "Nam_ticklerreport".
Private Sub Report_Open(Cancel As Integer)
Dim rst As ADODB.Recordset
Set rst = Sales_Rep
While Not rst.EOF
DoCmd.OpenReport , acViewPreview, rst, "sales_rep"
DoCmd.SendObject acSendReport, Nam_ticklerReport, pdf, "test@test1.com", , , Test, "sucess?", no
.MoveNext
Wend
End With
End Sub