Private Sub Email_Notification_Button_Click()
'This function emails out an notification email to recipients to flag a Internal Incident has been raised
If MsgBox("Would you like to send an email notification to highlight concern?", vbYesNo + vbQuestion, "Email Notification") = vbYes Then
'send email notification
Dim ccto As String
Dim bccto As String
Dim mailto As String
'Mail Recipients
mailto = DLookup("Email", "Tbl_Users", "Name=" & "Investigation_Lead")
ccto = DLookup("Email", "Tbl_Users", "Alias=" & "Customer")
bccto = ""
'Email Subject
mailsub = "NEW INTERNAL CONCERN: " & Me.Full_ID & ""
'Email Message
emailmsg = "Incident ID: " & Me.Full_ID & vbNewLine & "Category: " & Me.Category & vbNewLine & "Incident Owner: " & DLookup("Name", "Tbl_Users", "Alias=" & "Customer") & vbNewLine & "Product: " & Me.Product & " " & Me.Denomination & vbNewLine & "Title: " & Me.Complaint_Description & vbNewLine & vbNewLine & "Please liaise with the Incident Owner for further information in relation to the above concern."
'On Error Resume Next
DoCmd.SendObject acSendNoObject, , , mailto, ccto, bccto, mailsub, emailmsg, False
DoCmd.Save
DoCmd.Close
Else
DoCmd.Save
DoCmd.Close
Exit Sub
End If
End Sub