The code I have works great as long as the 2 CC fields are not null. Can someone tell me how to make it work if the fields are null?
Here is my code:
Private Sub cmdMailTicket_Click()
On Error GoTo Err_cmdMailTicket_Click
Dim varTo As Variant '-- Address for SendObject
Dim stCC As String '--Addresses for CC
Dim stText As String '-- E-mail text
Dim RecDate As Variant '-- Rec date for e-mail text
Dim JobNum As Variant '-- Job Number for subj line text
Dim stSubject As String '-- Subject line of e-mail
Dim strSQL As String '-- Create SQL update statement
Dim errLoop As Error
'-- Combo of names to Send Note to
varTo = Me.strEmailAddress
stCC = Me.strCCEmailAddress & "; " & Me.strCC2EmailAddress
stSubject = Me.[Job Number] & " - " & Me.strSubjectLine
stText = Me.strComments
'Write the e-mail content for sending to assignee
DoCmd.SendObject , , acFormatTXT, varTo, stCC, , stSubject, stText, -1

Private Sub cmdMailTicket_Click()
On Error GoTo Err_cmdMailTicket_Click
Dim varTo As Variant '-- Address for SendObject
Dim stCC As String '--Addresses for CC
Dim stText As String '-- E-mail text
Dim RecDate As Variant '-- Rec date for e-mail text
Dim JobNum As Variant '-- Job Number for subj line text
Dim stSubject As String '-- Subject line of e-mail
Dim strSQL As String '-- Create SQL update statement
Dim errLoop As Error
'-- Combo of names to Send Note to
varTo = Me.strEmailAddress
stCC = Me.strCCEmailAddress & "; " & Me.strCC2EmailAddress
stSubject = Me.[Job Number] & " - " & Me.strSubjectLine
stText = Me.strComments
'Write the e-mail content for sending to assignee
DoCmd.SendObject , , acFormatTXT, varTo, stCC, , stSubject, stText, -1