Send multiple emails based on employee using Microsoft Access 2007and Outlook

M

mp80237

I have a query in Microsoft Access 2007. I need to email each
employee every week their open orders that need to be updated. There
are about 120 employees I need to send these updates to every Friday.
Is there a way to create a query and just send each employee there
order that needs to be updated thru Outlook?

OrderId OpenDate DateNeededBy EmployeeName EmployeeEmail Status
1 02/9/2009 03/05/2009 Patrick Gidding (e-mail address removed) Open
2 02/21/2009 03/25/2009 Greg Barlett (e-mail address removed) Open
3 02/28/2009 03/17/2009 Karen Sapp (e-mail address removed) Open
4 03/05/2009 03/20/2009 Rebecca McMillian (e-mail address removed) Open
5 03/06/2009 03/16/2009 Patrick Gidding (e-mail address removed) Open
6 03/06/2009 03/21/2009 Greg Barlett (e-mail address removed) Open
7 03/07/2009 03/25/2009 Karen Sapp (e-mail address removed) Open


**For example Patrick's email will state:

Please review the open tickets below and if there are any issues
please contact your manager.

OrderId OpenDate DateNeededBy EmployeeName EmployeeEmail Status
1 02/9/2009 03/05/2009 Patrick Gidding (e-mail address removed) Open
5 03/06/2009 03/16/2009 Patrick Gidding (e-mail address removed) Open

Thank you,

**Then another email will follow for Greg

Please review the open tickets below and if there are any issues
please contact your manager.

OrderId OpenDate DateNeededBy EmployeeName EmployeeEmail Status
2 02/21/2009 03/25/2009 Greg Barlett (e-mail address removed) Open
6 03/06/2009 03/21/2009 Greg Barlett (e-mail address removed) Open

Thank you,

---- Is there a way to do this without creating a macro for each
employee? Thank you so much for the help.

M
 
M

MGFoster

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Use the DoCmd.SendObject method. Read how in the Access VBA Help
article "SendObject Method." (How to: Open the Debug window (Ctrl-G);
type in SendObject; put the cursor on the word & hit the F1 key. If you
have the VBA help installed on your PC the article will appear.) If
you're not sending an object, just set the ObjectType parameter to
acSendNoObject, or leave the parameter blank 'cuz acSendNoObject is the
default.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBSctOA4echKqOuFEgEQJCBQCfTmlc3qS6tVtvd3xIBT/sCrFQSCYAnjAw
5BPtyVpk3HSQwls0R46Wjp4M
=AL7R
-----END PGP SIGNATURE-----
 
M

mp80237

The SendObject method wants me to specify the email address per
query. There are 120 employees I need to send this to. Some weeks I
will only need to send to 50 employees, some weeks all 120 employees.
Creating 120 queries for each employee then creating a macro for each
query would take some time and more chance of error. ( if another
employee starts the company or there is not one for that employee that
week I don't want it send a blank email or not sending a email at all
to a new employee). Is there a way to create a loop or next that will
send a email to all employees in the query? Thanks for the help.

M





OrderId OpenDate DateNeededBy
EmployeeName EmployeeEmail Status
1 02/9/2009 03/05/2009 Patrick
Gidding (e-mail address removed) Open
2 02/21/2009 03/25/2009 Greg
Barlett (e-mail address removed) Open
3 02/28/2009 03/17/2009 Karen
Sapp (e-mail address removed) Open
4 03/05/2009 03/20/2009 Rebecca
McMillian (e-mail address removed) Open
5 03/06/2009 03/16/2009 Patrick
Gidding (e-mail address removed) Open
6 03/06/2009 03/21/2009 Greg
Barlett (e-mail address removed) Open
7 03/07/2009 03/25/2009 Karen
Sapp (e-mail address removed) Open


**For example Patrick's email will state:


Please review the open tickets below and if there are any issues
please contact your manager.


OrderId OpenDate DateNeededBy
EmployeeName EmployeeEmail Status
1 02/9/2009 03/05/2009 Patrick
Gidding (e-mail address removed) Open
5 03/06/2009 03/16/2009 Patrick
Gidding (e-mail address removed) Open


Thank you,


**Then another email will follow for Greg


Please review the open tickets below and if there are any issues
please contact your manager.


OrderId OpenDate DateNeededBy
EmployeeName EmployeeEmail Status
2 02/21/2009 03/25/2009 Greg
Barlett (e-mail address removed) Open
6 03/06/2009 03/21/2009 Greg
Barlett (e-mail address removed) Open


Thank you,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top