W
wkaupert
I am trying to carbon copy multiple email addresses and the email addresses
are based on values in 4 fields located on the form. An account can have 1
to 4 email addresses. One issue I'm having is the "Invalid use of Null"
error I get when there isn't a second email address for an account. The
other issue I'm having is I can't carbon copy more than one email address. I
need to be able to copy Email2, Email3, and Email4 also understanding any of
these may have a null value. Please help! I'm suppose to launch the email
notification process on Friday!
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..."
Recordset.MoveFirst
Do Until Recordset.EOF
Select Case Me!DeliveryMethod
Case "Y"
stTo = Me.Email1.Value
stcc = Me.Email2.Value
stcc2 = Me.Email3.Value
stcc3 = Me.Email4.Value
DoCmd.SendObject acSendReport, "PastDuePremiumNotification",
acFormatRTF, stTo,?-Not sure what to put here-?, , 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
are based on values in 4 fields located on the form. An account can have 1
to 4 email addresses. One issue I'm having is the "Invalid use of Null"
error I get when there isn't a second email address for an account. The
other issue I'm having is I can't carbon copy more than one email address. I
need to be able to copy Email2, Email3, and Email4 also understanding any of
these may have a null value. Please help! I'm suppose to launch the email
notification process on Friday!
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..."
Recordset.MoveFirst
Do Until Recordset.EOF
Select Case Me!DeliveryMethod
Case "Y"
stTo = Me.Email1.Value
stcc = Me.Email2.Value
stcc2 = Me.Email3.Value
stcc3 = Me.Email4.Value
DoCmd.SendObject acSendReport, "PastDuePremiumNotification",
acFormatRTF, stTo,?-Not sure what to put here-?, , 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