J
JC
the following works- need message send options for importance, voting, category
based on criteria if approver > 2000 then go to name
Private Sub CMDSendEmail1_Click()
On Error GoTo Err_cmdSendEmail1_Click
Dim strEmailMessage As String
Dim strCC As String
Dim StrRcvdDate As String
Dim strDueDate As String
Dim StrSubject As String
Dim StrImportance As String
StrRcvdDate = Forms![Data FORM].Form![DateReceived]
'the due date for signoff
'the text of the message, use chr(10) for line breaks
strEmailMessage = "Please review the attached document, Approve or
Reject BY Email. Please email Medco Finance Contracts Admin the revised
Form." & Chr(10) & Chr(10) & "Thank You!" & Chr(10) & Chr(10) & "Adjustment
Administrator"
strCC = "Medco Finance Contracts Admin"
'the email address of all ccs
strBCC = ""
'the email address of all bccs
StrSubject = "Manual Billing Request. Adjustment Form"
'the subject of the email
'strTo = Forms![DataForm]![Form1].Form![UserID]
'the recipient of the email
strAttachment = "DATA RPT"
'the name of the attached report
StrImportance = "High" 'High importance
'"1"
DoCmd.SendObject acSendReport, strAttachment, "SnapshotFormat(*.snp)",
strTo, strCC, strBCC, StrSubject, strEmailMessage, True, ""
If Forms![Data FORM].Form![SaveReport] = -1 Then
DoCmd.RunMacro "SaveReport"
End If
Exit_cmdSendEmail1_Click:
Exit Sub
Err_cmdSendEmail1_Click:
MsgBox Err.Description
Resume Exit_cmdSendEmail1_Click
End Sub
based on criteria if approver > 2000 then go to name
Private Sub CMDSendEmail1_Click()
On Error GoTo Err_cmdSendEmail1_Click
Dim strEmailMessage As String
Dim strCC As String
Dim StrRcvdDate As String
Dim strDueDate As String
Dim StrSubject As String
Dim StrImportance As String
StrRcvdDate = Forms![Data FORM].Form![DateReceived]
'the due date for signoff
'the text of the message, use chr(10) for line breaks
strEmailMessage = "Please review the attached document, Approve or
Reject BY Email. Please email Medco Finance Contracts Admin the revised
Form." & Chr(10) & Chr(10) & "Thank You!" & Chr(10) & Chr(10) & "Adjustment
Administrator"
strCC = "Medco Finance Contracts Admin"
'the email address of all ccs
strBCC = ""
'the email address of all bccs
StrSubject = "Manual Billing Request. Adjustment Form"
'the subject of the email
'strTo = Forms![DataForm]![Form1].Form![UserID]
'the recipient of the email
strAttachment = "DATA RPT"
'the name of the attached report
StrImportance = "High" 'High importance
'"1"
DoCmd.SendObject acSendReport, strAttachment, "SnapshotFormat(*.snp)",
strTo, strCC, strBCC, StrSubject, strEmailMessage, True, ""
If Forms![Data FORM].Form![SaveReport] = -1 Then
DoCmd.RunMacro "SaveReport"
End If
Exit_cmdSendEmail1_Click:
Exit Sub
Err_cmdSendEmail1_Click:
MsgBox Err.Description
Resume Exit_cmdSendEmail1_Click
End Sub