PC Review


Reply
Thread Tools Rate Thread

Automating Emailed Reports from Access

 
 
rhmorrison@hotmail.com
Guest
Posts: n/a
 
      14th Jan 2008
Hi,

I have a database to track appointments for consultants. What I need
to do is run a report for each consultant and email their individual
reports to them. I'd like to be able to do this from one command
button on the main form. Any ideas how I would do this?

Thanks
r.
 
Reply With Quote
 
 
 
 
Dale Fye
Guest
Posts: n/a
 
      14th Jan 2008
The way I have done this in the past is to:

1. Add an unbound textbox to your form (you can hide it).
2. Create your report, and have the query that supports it based on that
unbound text box (consultant).
3. Then, in the code behind the Click event of your command button, create
a recordset of consultants (SELECT ConsultantID, C.email from Consultants C
INNER JOIN ConsultantSchedule CS ON C.ConsultantID = CS.ConsultantID WHERE
CS.ApptDate = #1/15/2008#)

4. Loop through the consultants, populate the unbound textbox with the
ConsultantID retrieve in this recordset
5. Inside the loop, use SENDOBJECT to send the report to the consultant.
Depending on which security updates you have, and what your email software
is, you will probably get a security warning for each of the SendObject
messages. Although I've recently seen a message on my machine that allows me
to set a timeframe where I can use multiple SendObject commands and only get
the security warning once.

HTH
Dale
--
Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.



"(E-Mail Removed)" wrote:

> Hi,
>
> I have a database to track appointments for consultants. What I need
> to do is run a report for each consultant and email their individual
> reports to them. I'd like to be able to do this from one command
> button on the main form. Any ideas how I would do this?
>
> Thanks
> r.
>

 
Reply With Quote
 
Tom van Stiphout
Guest
Posts: n/a
 
      14th Jan 2008
On Sun, 13 Jan 2008 21:56:37 -0800 (PST), (E-Mail Removed)
wrote:

DoCmd.SendObject is the simplest way to send a report with
appointments. Your report would use a query that "looks back" on a
form to see for which ConsultantID the report would be generated.
Once you have that, just execute that in a loop over all consultants.
In the loop you would also set that "look back field" to the current
ConsultantID.

-Tom.


>Hi,
>
>I have a database to track appointments for consultants. What I need
>to do is run a report for each consultant and email their individual
>reports to them. I'd like to be able to do this from one command
>button on the main form. Any ideas how I would do this?
>
>Thanks
>r.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Emailed error reports PokerMan Microsoft C# .NET 4 17th Feb 2007 05:51 PM
Log of emailed reports =?Utf-8?B?cGF1bHU=?= Microsoft Access VBA Modules 0 30th Jan 2006 11:35 PM
Not showing graphics on emailed reports =?Utf-8?B?Tmljaw==?= Microsoft Access Reports 1 30th May 2005 12:57 PM
Automating Access Reports =?Utf-8?B?Z29uem9taWFtaQ==?= Microsoft Access 2 7th Jan 2005 05:33 PM
Automating Email of Individual Reports via Access Ginger Microsoft Access Forms 1 6th Jan 2004 07:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:36 PM.