Page 1 of 2 12 LastLast
Results 1 to 15 of 23
  1. #1
    mari_hitz is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2011
    Posts
    28

    Send e-mail with info from Report

    Hi!


    I would like to make a question. I do not know if I am writing this in the right sub forum but here it is: I have a report that brings me a list of people to whom I should send an e-mail. I know this can be done with a button, however, I would like to know if when you run the report automatically after this is done, there is an e-mail sent to the people that appear on that list.
    I do not if I have explained myself right, please do let me know. Thanks!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Just running the report will not send email. Need VBA code to send emails. Review this recent thread https://www.accessforums.net/import-...ook-18221.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    Here is an additional tutorial on sending emails from Access.

    http://www.datapigtechnologies.com/f...sendemail.html

    Alan

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    As always, DataPig has a good tutorial, although this one is bit out of date (built for Access2003) and has one minor misinformation. It is possible to send email without the warning popup. My procedure does that.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    mari_hitz is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2011
    Posts
    28
    Hi! Thanks for your answer, however they do not work for what I am trying to do or I do not know how to make it work J What I am needing is the following:
    I have a query that brings me information from two tables, based on this query I need to send an e-mail to each person that appears in the result. E-mails can be found as one field in the table and query. So I would like to send an e-mail to the persons in that particular column. Is there any way to do that?
    Thanks!

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Need to open a recordset of addressees in VBA and read through the recordset. The second link in that referenced thread has example code. Here it is again http://www.blueclaw-db.com/access_em...nd_outlook.htm
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    mari_hitz is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2011
    Posts
    28
    Hi June7 thanks for your answer! I am sorry but I am not very familiarized with VBA, so I would like to make you a question: in the following field part of the code I should change the "Form_F_People_Mailings.RecordsetClone" to the text box where I have the mail list in my access form?

    Code:
    Set rst =  Form_F_People_Mailings.RecordsetClone
    I have tried to understand the code, but I am going slow and I need to know if it is possible to capture the e-mail list that I want and how.

    Thanks!

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    No. That refers to the form where the list of addressees is displayed. RecordsetClone creates a virtual (in memory) recordset of the listed addressees. The code was originally designed for a VB project and presumes a form like the one shown on the site is in use.

    Some parameters you need to clarify:
    Do you want to send 1 email with multiple To addressees? This requires building a single string for the To value.
    Should each recipient see all the other recipients? Creating an addressee string for the To value will do that. If all should be blind to the others, need to build string for the BCC value and single To addressee will be yourself.

    Or do you want to send an email to each recipient individually?

    With either approach, code must loop through a list of addressees.

    The example code does the latter - sends an individual email to each recipient.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    mari_hitz is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2011
    Posts
    28
    Thank you very much!
    I would need to build a code to send on BCC one single mail to all the people that appear in my report to send the information to.
    COuld you please help me on building this? I can send you a copy of my database. I would appreciate your help, I have to do this for work and I have a deadline. Thanks!

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Attach project with the attempted code to post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #11
    mari_hitz is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2011
    Posts
    28
    Hi! Sorry for the delay.
    This is my database. I have several reports and then queries that bring me the people that it is not in the included in the rest of the reports compared to the first report.
    What I would like to do it to create a macro that can send an e-mail to all the people that is after the query is ran. I would like to create a single mail with all this people con BCC. Right now on the database there is a macro that sends the report attached to the people, however that it is not what I want.
    I do not know if I am explaining myself good. I need to present this next week and I tried to solve it, but had no luck. You guys have been very helpful and I am reallly thankfull for everything.
    Could you please help me with this?

  12. #12
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Macro won't accomplish this. Needs to be VBA code. There is no VBA in this project. No apparent attempt to incorporate referenced examples. Here is another code sample: http://bytes.com/topic/access/answer...outlook-2007-a

    You also did not include the linked Excel workbook(s) so there is no data to work with.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  13. #13
    mari_hitz is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2011
    Posts
    28
    Sorry for not attaching the excel files. Since the report I have used is too big I had to uploaded in another place http://www.mediafire.com/download.php?v6ebfeu3nf434f3.
    I was reviewing the code that it is posted in the link you paste. In this code you have to create a table that includes the e-mails, however, since the e-mail adresses are not going to be always the same, can I skip that step?
    I mean, I would like the e-mail adresses to be obtained from the query that I will run.
    Thanks!

  14. #14
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    The addresses must come from somewhere. A query is a manipulation of data stored in table(s). The email procedure can use table or query as data source. So if you already have a table of email addresses then that step is done. I suppose the linked Excel sheets have your addresses.

    Now I can open the queries in design view. The queries with multiple tables have no join clause. This won't work. Without join clause records are not related. I suppose the Personnel Number would be the primary/foreign key for all tables. Do all tables have all possible personnel numbers so that the relationships are one-to-one both ways?

    Need to fix queries before proceeding.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  15. #15
    mari_hitz is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2011
    Posts
    28
    Hi June, in response to your inquiry the Personnel Number is the primary/foreign key for all tables and all tables have all possible personnel numbers so that the relationships are one-to-one both ways.

    I did the queries by "Query design", what you mean of "Join" that it is made on SQL right? I really do not know how to do that.
    I think what I am trying to do is really hard, right?

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. send a form via mail
    By Fabdav in forum Forms
    Replies: 1
    Last Post: 10-12-2011, 07:35 AM
  2. Automatically Send E-Mail from Access
    By lilygtg in forum Access
    Replies: 1
    Last Post: 08-24-2011, 05:48 PM
  3. Help Send Report to File.
    By alyon in forum Access
    Replies: 4
    Last Post: 08-22-2011, 10:37 AM
  4. Replies: 4
    Last Post: 04-13-2011, 10:11 AM
  5. Send mail to the chosen ones
    By carstenhdk in forum Import/Export Data
    Replies: 0
    Last Post: 05-18-2010, 11:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums