Emailing Query Results

JDSVEND

New member
Local time
Yesterday, 16:51
Joined
Aug 21, 2014
Messages
3
I have a query that identifies a list of Sales People and a segment of their customers. I would like to send the query results via email to each sales person via email. I have a separate table that has the email address of each Sales Person.

Currently I filter by Sales person and then do a file send as an Excel Spreadsheet for each Sales Person. Very manual and time consuming process.

I would like to set up a command button and I need the code to filter the query and send the email out and have it loop through the entire query until all Sales People have received their customers.
 
Attached is a example of the query results. I would like to send John Doe an email with an attachment of just his 2 records, then send email to Jane Dane with just her records etc. email1, email 2 would be the actual email addresses of the sales person.

Email Address Sales Person CUST NO Customer Total Sales
email 1 John Doe 111 Test Cust 1 12,058.23
email 1 John Doe 998 Test Cust 2 905.62
email 2 Jane Dane 227 Test Cust 3 2,012.51
email 2 Jane Dane 878 Test Cust 4 4,982.76
email 3 James Brown 356 Test Cust 5 5,434.03
email 3 James Brown 787 Test Cust 6 2,510.39
email 4 Jackie Smith 455 Test Cust 7 3,745.81
email 4 Jackie Smith 667 Test Cust 8 9,911.32
 

Users who are viewing this thread

Back
Top Bottom