S
Swordfish
Hello,
I have a tab called Routing with four combo boxes: Production Assigned
(Productionassignedname), Q A Reviewer(QA), Second Tester Assigned(Sectester)
and Claims Monitoring Assigned(Claimmonitor), the controls in parentheses.
In the coding below for Production Assigned and QA, the combo box will
always be required to be enabled. So the email address from these two field
will show in the To: field of the email.
But for Second Tester Assigned and Claims Monitoring Assigned they are
enable=no until another action makes them enabled. I would like to have the
coding recognize if the field is enable then the email address is added to
the To: field of the email.
The coding I have below is not working as you can see. Would someone be
able to assist?
Thank you in advance
Private Sub SendEmail_Click()
Dim SendTo As String, strMsg As String
SendTo = DLookup("[EmailAddress]", "tblBenefitsEmployee", "[EmployeeID] =
" & Me.Productionassignedname)
SendTo = SendTo & ";" & DLookup("[EmailAddress]", "tblBenefitsEmployee",
"[EmployeeID] = " & Me.Q_A)
'If Not IsNull(SecondTester) Then
'SendTo = SendTo & ";" & DLookup("[EmailAddress]", "tblBenefitsEmployee",
"[EmployeeID] = " & Me.SecondTester)
'If Not IsNull(SecondTester) Then
'SendTo = SendTo & ";" & DLookup("[EmailAddress]", "tblBenefitsEmployee",
"[EmployeeID] = " & Me.ClaimMonitor)
'If Not IsNull(cboQAassigned) Then
'SendTo = SendTo & ";" & DLookup("[EmailAddress]",
"tblBenefitsEmployee", "[EmployeeID] = " & Me.QAassignedname)
'End If
Call ComposeNotesMemo(SendTo, _
"Production Assigned and QA Assigned", strMsg)
strMsg = "Good Day," & vbCrLf & vbCrLf & _
"Please note: you have been assigned " & _
" the following WIT entry" & vbCrLf & vbCrLf & _
"DataTRAK Number - " & Me![Datatrak_Number] & vbCrLf & _
"Effective Date: " & Me![EFFECTIVE_DATE] & vbCrLf & vbCrLf & _
"Production Assigned - " & Me![Production Assigned] & vbCrLf & _
"QA Reviewer assigned - " & Me![QandALead] & vbCrLf & vbCrLf & _
"Second Tester Assigned - " & Me![SecTester] & vbCrLf & _
"Claims Monitoring Assigned - " & Me![ClaimMonitor] & _
vbCrLf & vbCrLf & "Thank You"
End Sub
I have a tab called Routing with four combo boxes: Production Assigned
(Productionassignedname), Q A Reviewer(QA), Second Tester Assigned(Sectester)
and Claims Monitoring Assigned(Claimmonitor), the controls in parentheses.
In the coding below for Production Assigned and QA, the combo box will
always be required to be enabled. So the email address from these two field
will show in the To: field of the email.
But for Second Tester Assigned and Claims Monitoring Assigned they are
enable=no until another action makes them enabled. I would like to have the
coding recognize if the field is enable then the email address is added to
the To: field of the email.
The coding I have below is not working as you can see. Would someone be
able to assist?
Thank you in advance
Private Sub SendEmail_Click()
Dim SendTo As String, strMsg As String
SendTo = DLookup("[EmailAddress]", "tblBenefitsEmployee", "[EmployeeID] =
" & Me.Productionassignedname)
SendTo = SendTo & ";" & DLookup("[EmailAddress]", "tblBenefitsEmployee",
"[EmployeeID] = " & Me.Q_A)
'If Not IsNull(SecondTester) Then
'SendTo = SendTo & ";" & DLookup("[EmailAddress]", "tblBenefitsEmployee",
"[EmployeeID] = " & Me.SecondTester)
'If Not IsNull(SecondTester) Then
'SendTo = SendTo & ";" & DLookup("[EmailAddress]", "tblBenefitsEmployee",
"[EmployeeID] = " & Me.ClaimMonitor)
'If Not IsNull(cboQAassigned) Then
'SendTo = SendTo & ";" & DLookup("[EmailAddress]",
"tblBenefitsEmployee", "[EmployeeID] = " & Me.QAassignedname)
'End If
Call ComposeNotesMemo(SendTo, _
"Production Assigned and QA Assigned", strMsg)
strMsg = "Good Day," & vbCrLf & vbCrLf & _
"Please note: you have been assigned " & _
" the following WIT entry" & vbCrLf & vbCrLf & _
"DataTRAK Number - " & Me![Datatrak_Number] & vbCrLf & _
"Effective Date: " & Me![EFFECTIVE_DATE] & vbCrLf & vbCrLf & _
"Production Assigned - " & Me![Production Assigned] & vbCrLf & _
"QA Reviewer assigned - " & Me![QandALead] & vbCrLf & vbCrLf & _
"Second Tester Assigned - " & Me![SecTester] & vbCrLf & _
"Claims Monitoring Assigned - " & Me![ClaimMonitor] & _
vbCrLf & vbCrLf & "Thank You"
End Sub