Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Emailing

Status
Not open for further replies.

jdwm2310

Technical User
Jul 26, 2001
396
US
Hi,

I have combo box labeled "Routed to". When the user selects a name from the combobox an email should be sent to the person selected. so if i select John Smith and email of the form will be sent to John Smith. Any suggestions as to how to approach this one.
 
Instead of saying john in the combo box you could show the mail addesses, the code will create a email when the combobox is changes, this code requires outlook to be running.


DoCmd.SendObject attachment type, attacted file name, HTML rtf mail, to, CC, BCC, Subject, Message


sub combobox_afterupdate()
DoCmd.SendObject ,,, acFormatRTF, combobox, , , "Title here", "Some text in the main message bit"
end sub

 
Geo45,

I totally agree with you I changed the names to their corresponding email address, however I want to open the form but I want the subject line to say "Ticket Number __ requires your response, please launch the database to open the ticket"

tHe ticket number is an autonumber...I could I make the actual ticket number be inserted message line???
 
lets say that your autonumber field on your form is called "Autonum"

sub combobox_afterupdate()
DoCmd.SendObject ,,, acFormatRTF, combobox, , , Autonum & " requires your response, please launch the database to open the ticket", "Some text in the main message bit"
end sub

I am not sure if it is an & sign or +

the subject for autonumber 1 should look like

1 requires your response, please launch the database to open the ticket

hope this helps

Geo45
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top