Originally Posted by
shane.albrandt
Help!
I am not sure HELP is a question. How about we break your task down into manageable sections that you can research yourself and then when you get stuck on a specific part you come back here and ask that question.
The Information You Need
First you need to look at how to open a Record Set based on an SQL.
This SQL will need to Join the two tables together on the key that is common between the two tables. I think it might be manager name.
Generally you will need an inner join so that if there is no match then it will not be in the resulting recordset.
Thus you will get a resulting record set with the managers name alot and in another column each employee he has.
Once you have this RecordSet you will then have to move through it.
RecordSet.movefirst or movenext etc.
Email
Have a look in the internet you will find many many examples of starting outlook and creating an email. Access sometimes is not allowed to automatically send outlook emails and this could be a problem for you. What do you intend to use?
Putting these two things together.
- Get your recordset
- move to first record
- get managers name and email
- get first employees name and save to a string variable
- move to next record in a loop adding employee names to the string while manager name does not change
- when managers name changes add all information to an Outlook emailitem
- send or save email
- then repeat the above process for the next managers name
Bookmarks