Help. I have my DB set up to email customers daily based off my call list for the day. It works well. Currently I can only email one customer contact per customer email. I have my call Info form set up to where I can have two contacts listed for each call if needed. In the thank you email I would like both individuals to receive the email at their own email address. In my contacts(people) form, the fields are ContactID, ContactName, ContactTitle, ContactEmail, etc. In my CALL info form I have a field for OtherContactID. This field is a combo box(OtherContactCombo) on my callinformationform which also has a combo box(ContactCombo) for the contactid. Currently, the customer in the contactID field populates in both the To and CC field when the sendemail code runs. Here is my code:
DetailsPrivate Sub SalesEmailBTN_Click()
Dim db As Database Dim rs As Recordset Dim Counter As Long Dim Greeting As String Dim LastNote As String Dim Currenthour As Long Dim ID As Long Dim Msg As String, Subject As String, Signature As String, CCEmail As String
If MsgBox("Are you SURE?", vbYesNoCancel) <> vbYes Then Exit Sub
Currenthour = Hour(Now)
Select Case Currenthour Case 0 To 11 Greeting = "Good Morning" LastNote = "morning" Case 12 To 16 Greeting = "Good Afternoon" LastNote = "afternoon" Case Else Greeting = "Good Evening" LastNote = "evening" End Select
Set db = CurrentDb Set rs = db.OpenRecordset("Select * From SendDailyCustomerEmailQ") Counter = 0 While Not rs.EOF
If rs!SalesCallTypeID = 2 Then
Msg = Greeting & " " & rs!Contacted2 & ",
" & _ "Thank you for taking the time to speak with me today. It was a pleasure spending some time with you. Please visit our website, www.sefl.com, for more information about how we can assist with your transportation needs." & "
" & _ "If you have any questions or I can assist in any way, please let me know. " & "