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 » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

E-mailing one report with different data



 
 
Thread Tools Display Modes
  #1  
Old September 5th, 2008, 02:37 PM posted to microsoft.public.access.gettingstarted
AnnieV via AccessMonster.com
external usenet poster
 
Posts: 6
Default E-mailing one report with different data

I have a question that may be kind of basic but I’m stuck on the best way to
do this. I run a monthly open items aging report that varies in length (it’s
determined by the amount of vendors that have outstanding items each month so
it can be anywhere from 10-40 pages long). It’s one report but the pages are
broken up by vendor so each page contains separate vendor specific detail.
What I’d like to do is set up a macro that allows me to send each page via e-
mail to the vendor contact (the e-mail address is listed on each page). I’ve
only set up macro’s to e-mail before where everyone gets the same report
(usually internal company based mailings). Is there a way to set this up so I
can run the report and have it automatically e-mail each vendor their
specific detail page? I hope this question makes sense. Being able to do this
would save quite a bit of time.

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...arted/200809/1

  #2  
Old September 6th, 2008, 11:28 PM posted to microsoft.public.access.gettingstarted
ErezM via AccessMonster.com
external usenet poster
 
Posts: 50
Default E-mailing one report with different data

hi
set a global variable (let's call it vVendorID)
now use the command's button that should send the emails click event:

Dim rs As New ADODB.Recordset
rs.Open "Select This Month's Vendor ID's", CurrentProject.Connection,
adOpenForwardOnly, adLockReadOnly
While Not rs.EOF
vVendorID = rs!VendorID
DoCmd.SendObject acSendReport, "repVendors", acFormatPDF, rs!VendorEmail
rs.MoveNext
Wend
rs.Close
Set rs = Nothing

now you need to set a filter on the report's Open event to set it to the
right vendor (each time the report is conveted to pdf and sent it is opened)

Me.Filter="VendorID=" & vVendorID
Me.FilterOn=True

good luck
Erez

AnnieV wrote:
I have a question that may be kind of basic but I’m stuck on the best way to
do this. I run a monthly open items aging report that varies in length (it’s
determined by the amount of vendors that have outstanding items each month so
it can be anywhere from 10-40 pages long). It’s one report but the pages are
broken up by vendor so each page contains separate vendor specific detail.
What I’d like to do is set up a macro that allows me to send each page via e-
mail to the vendor contact (the e-mail address is listed on each page). I’ve
only set up macro’s to e-mail before where everyone gets the same report
(usually internal company based mailings). Is there a way to set this up so I
can run the report and have it automatically e-mail each vendor their
specific detail page? I hope this question makes sense. Being able to do this
would save quite a bit of time.


--
May all beings be happy.

Message posted via http://www.accessmonster.com

 




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 08:43 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.