W
wkaupert
Below is the code I am using. It works but I need to add stcc2 to the CC
column. I tried the semicolon but that does not work. I'm not proficient in
code but understand it enough to follow you if you have a suggestion. Thanks
in advance.
Private Sub Command14_Click()
On Error GoTo Err_Command14_Click
Dim stTo As String
Dim stcc As String
Dim stcc2 As String
Dim stSubject As String
Dim stText As String
Dim errLoop As Error
stSubject = "Urgent: Information Regarding Past Due Premium"
stText = "Please review the attached file as it contains details
regarding policies that have not been paid in a timely manner."
Recordset.MoveFirst
Do Until Recordset.EOF
Select Case Me!DeliveryMethod
Case "Y"
stTo = Me.Email1
stcc = Me.Email2
stcc2 = Me.Email3
DoCmd.SendObject acSendReport, "PastDuePremiumNotification",
acFormatRTF, stTo, stcc, , stSubject, stText, 0
End Select
Recordset.MoveNext
Loop
Exit Sub
Exit_Command14_Click:
Exit Sub
Err_Command14_Click:
MsgBox Err.Description
Resume Exit_Command14_Click
End Sub
column. I tried the semicolon but that does not work. I'm not proficient in
code but understand it enough to follow you if you have a suggestion. Thanks
in advance.
Private Sub Command14_Click()
On Error GoTo Err_Command14_Click
Dim stTo As String
Dim stcc As String
Dim stcc2 As String
Dim stSubject As String
Dim stText As String
Dim errLoop As Error
stSubject = "Urgent: Information Regarding Past Due Premium"
stText = "Please review the attached file as it contains details
regarding policies that have not been paid in a timely manner."
Recordset.MoveFirst
Do Until Recordset.EOF
Select Case Me!DeliveryMethod
Case "Y"
stTo = Me.Email1
stcc = Me.Email2
stcc2 = Me.Email3
DoCmd.SendObject acSendReport, "PastDuePremiumNotification",
acFormatRTF, stTo, stcc, , stSubject, stText, 0
End Select
Recordset.MoveNext
Loop
Exit Sub
Exit_Command14_Click:
Exit Sub
Err_Command14_Click:
MsgBox Err.Description
Resume Exit_Command14_Click
End Sub