Results 1 to 3 of 3
  1. #1
    NateSmith is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2013

    Group by Field Value and Email Grouped Table

    Hello Everyone,

    I have a database, that records many POs. I currently have a query that takes all open POs and sorts them by vendor. My goal is to write a macro that emails each vendor with their set (and only their set) of open POs.

    I know how to write a macro to send an email in Microsft Outlook. However here is what I don't know how to do:

    1. Write a macro (or even a query I suppose) that would identify when a row starts with a new vendor name. (Kepp in mind, I have them sorted ascending by vendor name)

    2. Email the list of all POs by vendor to each individual vendor. My question - How would I get this email macro to pull only emails for a specific vendor, and then repeat this process for all subsequent vendors?

    Does step #1 need to be a series of make table queries?

    Thank you for anyone who has taken the time to read this and thank you even more for anyone who is willin to take the time to answer this question. I'm very grateful for your generosity. Please note though that my VBA knowledge is a result of me researching a few things on Google. If someone could point me in the right direction though, this may be all I need!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    The Great Land
    Common topic in forum.

    Use VBA.

    Open a recordset of the vendors and loop through the recordset, open report filtered to vendor, send email, close report, move to next vendor.

    Follow the links
    How to attach file: To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    NateSmith is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2013
    Thanks for your help June. I actually ended up doing this a little differently. Someone taught me how to have a loop within a loop and pull values that way, which seems efficient because I'll only ever have a max of about 75 rows to look through at a time.

    Anyway, your help is greatly appreciated and definitely set me on the right path. Thanks for your time.

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

Similar Threads

  1. Memo field table for email message
    By Ruegen in forum Programming
    Replies: 2
    Last Post: 10-14-2013, 11:16 PM
  2. Using query to group attachments for email
    By Monterey_Manzer in forum Access
    Replies: 7
    Last Post: 05-31-2013, 01:37 PM
  3. Grouped field header on report
    By Glenn_Suggs in forum Reports
    Replies: 2
    Last Post: 05-16-2013, 06:33 AM
  4. Replies: 1
    Last Post: 08-31-2011, 04:03 PM
  5. Replies: 0
    Last Post: 03-26-2011, 09:59 AM

Tags for this Thread

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