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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|