Results 1 to 7 of 7
  1. #1
    Steven.Allman is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2010
    Posts
    98

    SendObject to ALL recipients

    So far this forum has been great.
    Really taken my DB to the next level.
    New question.
    I have been using SendObjects in forms and reports for ages, yes even reports.
    Its simple when I use a WHEN statement to reference a field with the corresponding email address.
    NOW, I want to send something to EVERYONE.



    I have a query, that pulls all records with a null value in FIELD1.
    FIELD2 will contain the email addresses.
    So, I can easily create a report from this query showing Field1 is null, but I want ONE button where I can email EVERYONE on this report.
    Any easy way to do this?
    Simple fix is I copy paste from the query, as often one person is responsible for 40 records... so I have been pasting this in excel removing duplicates copy paste to TO in Outlook and send..
    but now that all my hard stuff is done, Im moving towards simplification.
    Thanks for listening :-)

  2. #2
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    7,963
    You have to loop through the recordset that makes up the report (assuming it contains the email addresses) and in that loop, execute the email code. If the report recordset doesn't contain the email addresses, then you need to add that to the report recordset (you don't have to show the addresses) OR query to get the addresses based on who will appear in the report and base the sending code on that. If you want to send report details that only pertain to a particular user, then that is a different situation.
    - "doesn't work" doesn't help. Implement changes in copies of your database.
    "Everyone has a photographic memory; some just don't have film." Steven Wright

  3. #3
    Steven.Allman is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2010
    Posts
    98
    The table is actually a sharepoint list and the user name is the email of the last person to modify, so it will ALWAYS have an email address associated.
    However, i dont really want to loop, I want to send a single email to multiple users, not one email to each, resulting in 100 emails..
    Does that make sense?

  4. #4
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    7,963
    You'd have to loop through the SP list to get all the recipients and add them to the TO field - either one by one or as a long string? Or the recipients aren't in the list, they are somewhere else? Sorry, I have 0 experience with SP lists and I don't really grasp where the multiple recipient names or addresses are coming from. Unless you have the recipients list as a complete string, I'd say you're going to have to loop something in order to build it. I'm just not following what that something is.
    Last edited by Micron; 11-23-2020 at 10:46 PM. Reason: clarification
    - "doesn't work" doesn't help. Implement changes in copies of your database.
    "Everyone has a photographic memory; some just don't have film." Steven Wright

  5. #5
    Steven.Allman is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2010
    Posts
    98
    I was afraid of that.
    SP List dont act too much differently than a Access Table. And i am purely using Access to use the information the users input on sharepoint, thats the only real difference.
    Appreciate the input though.

  6. #6
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    7,963
    So what does the list of recipients look like (post example) and what now? This sort of description means nothing to me and I have to surmise, to no one else here either:
    I have a query, that pulls all records with a null value in FIELD1.
    FIELD2 will contain the email addresses.
    So, I can easily create a report from this query showing Field1 is null, but I want ONE button where I can email EVERYONE on this report.
    You have to consider that we don't have the luxury of figuring out what that means or where it fits in because we can't see what you see. Maybe you should post a compacted and zipped db copy here with details on what to look at and where the recipients list comes from. Perhaps that db would have the list as a table and you could take any modifications and apply them to your production copy.
    - "doesn't work" doesn't help. Implement changes in copies of your database.
    "Everyone has a photographic memory; some just don't have film." Steven Wright

  7. #7
    Ajax is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    8,831
    not really following the requirement, but sounds like you want to use the concatrelated function to get your list of recipients - make sure you exclude duplicates - or perhaps use it on a 'select distinct emailaddress from myotherquery' query.

    be aware there is a limit on how many recipients you can email at one time

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Send PDF's to individual recipients
    By Gina Maylone in forum Access
    Replies: 9
    Last Post: 10-09-2019, 12:53 PM
  2. Email To Using Multiple Recipients
    By burrina in forum Sample Databases
    Replies: 1
    Last Post: 10-08-2019, 12:43 PM
  3. Get mail recipients from table
    By Senate in forum Programming
    Replies: 3
    Last Post: 03-15-2018, 08:19 PM
  4. Replies: 15
    Last Post: 06-29-2015, 11:12 AM
  5. Replies: 3
    Last Post: 09-12-2013, 02:19 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 - Senior Forums