Coding message in email

S

Swordfish

Good Day All,

I am trying to create the note below in the Click On \ Event Property –
which is added in the body of an email. I am having repeated problems and
continue to go back and forth with little success. Also, I am not sure how to
have the coding not show all on one line in the VB editor. Can you help?
The coding I have is further below.


Good Day,

Please note; you have been assigned the following WIT entry

DataTRAK Number – (Linked field with number) Effective Date: (Link to form
field Effective Date)

Production Assigned - (Link to the drop down field)
QA Reviewer Assigned - (Link to the drop down field)

Second Tester Assigned - (Link to the drop down field)
Claims Monitoring Assigned - (Link to the drop down field)


Thanks


Private Sub SendEmail_Click()
Dim SendTo As String

SendTo = DLookup("[EmailAddress]", "tblBenefitsEmployee", "[EmployeeID] =
" & Me.Productionassignedname)
SendTo = SendTo & ";" & DLookup("[EmailAddress]", "tblBenefitsEmployee",
"[EmployeeID] = " & Me.Q_A)

Call ComposeNotesMemo(SendTo, "Production Assigned and QA Assigned", "Good
Day," & vbCrLf & vbCrLf & "Please note; You have been assigned the following
WIT entry: DataTRAK Number --- " & Me.Datatrak_Number & vbCrLf & 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 &
"Thanks")
 
S

Swordfish

It works

Thanks Again

Swordfish said:
Thanks again, I will let you know how it turns out.

Beetle said:
It could come after the SendTo coding, but it has to
come before the function call since you would be using
it as an argument in the function.
--
_________

Sean Bailey


Swordfish said:
Thanks for the quick response.

Should the messaging be placed before the other coding or is this a
preference?

:

The underscore is a continuation character in VBA. Example
revised code might look like;

Private Sub SendEmail_Click()
Dim SendTo As String, strMsg As String

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"


SendTo = DLookup("[EmailAddress]", "tblBenefitsEmployee", "[EmployeeID] =
" & Me.Productionassignedname)
SendTo = SendTo & ";" & DLookup("[EmailAddress]", "tblBenefitsEmployee",
"[EmployeeID] = " & Me.Q_A)

Call ComposeNotesMemo(SendTo, _
"Production Assigned and QA Assigned", strMsg)

End Sub

--
_________

Sean Bailey


:

Good Day All,

I am trying to create the note below in the Click On \ Event Property –
which is added in the body of an email. I am having repeated problems and
continue to go back and forth with little success. Also, I am not sure how to
have the coding not show all on one line in the VB editor. Can you help?
The coding I have is further below.


Good Day,

Please note; you have been assigned the following WIT entry

DataTRAK Number – (Linked field with number) Effective Date: (Link to form
field Effective Date)

Production Assigned - (Link to the drop down field)
QA Reviewer Assigned - (Link to the drop down field)

Second Tester Assigned - (Link to the drop down field)
Claims Monitoring Assigned - (Link to the drop down field)


Thanks


Private Sub SendEmail_Click()
Dim SendTo As String

SendTo = DLookup("[EmailAddress]", "tblBenefitsEmployee", "[EmployeeID] =
" & Me.Productionassignedname)
SendTo = SendTo & ";" & DLookup("[EmailAddress]", "tblBenefitsEmployee",
"[EmployeeID] = " & Me.Q_A)

Call ComposeNotesMemo(SendTo, "Production Assigned and QA Assigned", "Good
Day," & vbCrLf & vbCrLf & "Please note; You have been assigned the following
WIT entry: DataTRAK Number --- " & Me.Datatrak_Number & vbCrLf & 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 &
"Thanks")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top