A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

email filtered report



 
 
Thread Tools Display Modes
  #1  
Old May 8th, 2007, 09:36 AM posted to microsoft.public.access.reports
Judith
external usenet poster
 
Posts: 54
Default email filtered report

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
  #2  
Old May 8th, 2007, 05:14 PM posted to microsoft.public.access.reports
Carl Rapson
external usenet poster
 
Posts: 517
Default email filtered report

"judith" wrote in message
...
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


  #3  
Old May 8th, 2007, 05:29 PM posted to microsoft.public.access.reports
Judith
external usenet poster
 
Posts: 54
Default email filtered report

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" wrote:

"judith" wrote in message
...
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



  #4  
Old May 8th, 2007, 10:41 PM posted to microsoft.public.access.reports
Carl Rapson
external usenet poster
 
Posts: 517
Default email filtered report

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

Carl Rapson

"judith" wrote in message
...
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" wrote:

"judith" wrote in message
...
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





 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:17 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.