Hi, I have access db generating an email to be sent out using vba. However, for some reason the hyphen is not being placed in between the email addresses. Suggestions? thanks in advance
Private Sub cmdfrmEmailReport_Click()
On Error GoTo Err_Ctrl
Dim sfile As String, sSubject As String, sBody As String, sMailTo As String, sMailCC As String
10 If Not IsNull([Form_20 InspectEntry].BUYER) Then
15 MsgBox "There is NO Buyer assigned to this Inspection, Please assign a Buyer to continue", vbOKOnly + vbExclamation, "No Buyer Assigned"
20 Exit Sub
25 End If
30 sMailTo = [Form_20 InspectEntry].BUYER
35 If Not IsNull([Form_20 InspectEntry].CC1) Then sMailCC = [Form_20 InspectEntry].CC1
50 If Not IsNull([Form_20 InspectEntry].CC2) Then sMailCC = "; " & sMailCC & [Form_20 InspectEntry].CC2
65 sSubject = "New Inspection Report"
70 sBody = "You have a New Inspection Order to Disposition." & vbCr
75 sBody = sBody & sBody = "Please Review Inspection: " & [Form_20 InspectEntry].ReportNo & vbCr
80 sBody = sBody & sBody = "Created By: " & [Form_20 InspectEntry].User & vbCr
85 sBody = sBody & sBody = Now() & vbCr & "Sent By: " & Form_SwitchBoard.UserNameField
90 sfile = ""
95 Call Mail_Outlook(sfile, sMailTo, sMailCC, sSubject, sBody, bSendEmail)
100 Me.cmdfrmClose.SetFocus
105 Me.cmdfrmEmailReport.Visible = False
Exit_Sub:
5000 Exit Sub
Err_Ctrl: ' Call Local Form Level Error Routine
5005 el = erl
5010 en = Err.number
5015 ed = Err.Description
5020 errMsgStr = "Form '20 InspectEntry"
5025 ctrlfnctnm = "cmdfrmEmailReport_Click()"
5030 Call form_err(en, ed, ctrlfnctnm, el, errMsgStr)
5035 Resume Exit_Sub
End Sub
Bookmarks