I have a database with a combo box called "Salesman" on a form. When I create a new record, I would like to automatically send an email report to the salesman that is selected in the combo box. Please Help.
I assumed a couple of things here so let me know if its wrong.
First that you are using outlook and that you will be sending an access report object based on the same data as the form
The report is sent as a rich text file.
On the event in question (maybe after a button click) add the code
DoCmd.SendObject acSendReport, "Report Object Name", acFormatRTF, name of combo box,"CC Email Address if needed","BCC Email if needed","Subject of Email","Message",False
The false at the end sends the email without you seeing it. if you change it to True you would be able to edit the message before sending it. If you dont need the CC or BCC emails still put the commas in as they define the arguments even if you dont use them
The MSAccess help file on this is ok, but shout if you need help.
I'm working on this very same issue and have a question to add...
I see that I can hard code in an email address, but like Jor47, I want to send a piece of the report to a specific person. I have a store and an email for that store, so I'm trying to figure out how to write code to send it to the store and that store's email based on a selection made by the user (ie, the user picks a store, and the report with that store's data only get's sent to that store's email... Can this be done, or only by hardcoding it?