email filtered report

G

Guest

I am looping through a recordset and want to send a snapshot report to each
person in the recordset. The report should be filtered for the current
peopleID but I dont know how to pass the current peopleID to filter the
report before i do a sendObject

Any suggestions please
 
C

Carl Rapson

judith said:
I am looping through a recordset and want to send a snapshot report to each
person in the recordset. The report should be filtered for the current
peopleID but I dont know how to pass the current peopleID to filter the
report before i do a sendObject

Any suggestions please

Pass the peopleID in the 3rd (WhereCondition) parameter of the OpenReport
method:

DoCmd.OpenReport "report name",,,"[peopleID]=" & recordset![peopleID]

Carl Rapson
 
G

Guest

I dont think this will work as i dont physically want to open the report, i
just want to use it in the sendObject statement but want the snapshot output
to be filtered

DoCmd.SendObject acSendReport, "individualRenewalEmail",
acFormatSNP, toName, , , toSubject, toMsg

My only idea is to write down the filter field back to the form as i loop
through the dataset and pick up the filtered report from a query using the
form field as a filter. It just seems a bit inefficient

Carl Rapson said:
judith said:
I am looping through a recordset and want to send a snapshot report to each
person in the recordset. The report should be filtered for the current
peopleID but I dont know how to pass the current peopleID to filter the
report before i do a sendObject

Any suggestions please

Pass the peopleID in the 3rd (WhereCondition) parameter of the OpenReport
method:

DoCmd.OpenReport "report name",,,"[peopleID]=" & recordset![peopleID]

Carl Rapson
 
C

Carl Rapson

As far as I know, you can't filter a report when using SendObject without
opening the report first.

Carl Rapson

judith said:
I dont think this will work as i dont physically want to open the report, i
just want to use it in the sendObject statement but want the snapshot
output
to be filtered

DoCmd.SendObject acSendReport, "individualRenewalEmail",
acFormatSNP, toName, , , toSubject, toMsg

My only idea is to write down the filter field back to the form as i loop
through the dataset and pick up the filtered report from a query using the
form field as a filter. It just seems a bit inefficient

Carl Rapson said:
judith said:
I am looping through a recordset and want to send a snapshot report to
each
person in the recordset. The report should be filtered for the current
peopleID but I dont know how to pass the current peopleID to filter the
report before i do a sendObject

Any suggestions please

Pass the peopleID in the 3rd (WhereCondition) parameter of the OpenReport
method:

DoCmd.OpenReport "report name",,,"[peopleID]=" & recordset![peopleID]

Carl Rapson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top