Combo box and auto email

  • Thread starter Thread starter bmcrae
  • Start date Start date
B

bmcrae

Guest
Hi,
I am a novice.

I am trying to send an automatic email to a CSR (listed in a combo box in a form) when a command button is clicked.

I have a table which lists all the CSR's by name, and a field in the same table with their email address.

The form gives the user a selection of CSR's in a combo box. When the user has completed their task they click a button which I would like to automatically send an email to the CSR selected in the combo box.

Through info on this forum I have been able to write code for the command button. But it is very basic and will only send the email to a static email address (" CSR email address".)

Private Sub Command202_Click()
DoCmd.SendObject , , , " CSR email address", , , "Proofs complete for Job # " & Me("Job #"), "The proofs for Job # " & Me("Job #") & " were completed at" & Me("Proofs out") & ". They are ready to be picked up. Thank you.",
False
End Sub

Your help would be appreciated.
Thanks,
Brett
 
I have something similar set, where it opens a blank email, with the to address set by the current record being viewed in the form.

As I understand it all you should need to do is change part of your code to:

DoCmd.SendObject , , , [NAME OF COMBO BOX], , ,

I used a text box to hold my email address, but it should work with a combo box.
 

Users who are viewing this thread

Back
Top Bottom