Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send grouped reports to different recipients

Status
Not open for further replies.

RBCDS

Technical User
Apr 6, 2001
24
CA
I have a report that is grouped by Brokers including a subreport of thier clients that hold ABC Company. I would like to distribute the reports to the Broker mentioned on the report. I have tried the sendobject method but I can't figure out what to put for "TO" argument.

DoCmd.SendObject acSendReport, , acFormatRTF, <<help me>>
 
Yes! Please see Thread181-60871 , cut to the chase and go waaay down to the bottom. Your answer is there! :) Gord
ghubbell@total.net
 
Gord, Thanks for the link to the existing thread. I have got the emails to send to each of the recipients on my list. It is just that the whole report is sent to each person instead of just thier accounts. I believe my problem lies in the &quot;qdf.Parameters!ID = Me!ProID&quot; section of the code. Could you explain what this statement does or what else my problem could be.

thanks in advance... Dan |-0
 
Hi Dan,
Good to here you've sort of got it going! Henry's~Kathryn's code appears to send a group of recipients their appropriate project although they all get the same report.

qdf.Parameters!ID = Me!ProID would be filling the parameter off of a form (by the &quot;Me!&quot;) with the ID of one project. In actuality by this method you could only send 1 project(report) but to many contacts.

Your requirements would mean that you'll probably have to move the &quot;parameters&quot; position in the loop or simply handle the issue another way: I'd say generate a recordset with each of your desired recipients. Loop through it each time with the report based on the the current record (like their name or ID), send their &quot;person specific&quot; report, move to the next recipient in line and start all over until the recordset is spent: I don't know how your report is set up but this probably requires that within the loop you 're report's Record source is modified by the value obtained in the loop to properly address your recipient.

I'm confusing myself a little, so I'll leave you with it to ponder... but I think something along these lines would take care of your problem! X-)

Gord
ghubbell@total.net
 
Your the Man... I'm gonna play around with your ideas for a bit, thanks.... Dan >:):O>
 
Gord, Sorry but I am just getting more & more confused trying to figure this out.

Dan :-I
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top