Hi,
First of all I'm only a part time user of Access code and would be in huge trouble if not for the help received from you guys here
My latest problem is with building an email and sending it to Lotus Notes, in short my code is as follows
Private Sub cboSendEmail_Click()
Dim strEmail, strBody, strSubject As String
strBody = strBody & "Dear " & txtName & Chr(13) & Chr(13)
strBody = strBody & "Below is the information you requested" & Chr(13) & Chr(13) & Chr(13)
strBody = strBody & "Name: " & txtSNO & Chr(13)
strBody = strBody & "Date: " & txtSNO & Chr(13)
strBody = strBody & "City, State, Zip: " & txtAddress & Chr(13)
strBody = strBody & "Outage Area: " & txtArea & Chr(13)
strBody = strBody & "Incident Number: " & txtINCD & Chr(13)
strBody = strBody & "Fault: " & txtFault & Chr(13)
strBody = strBody & "Outage Time" & txtTime
DoCmd.SendObject acSendNoObject, , "Rich Text Format", strEmail, , , strSubject, strBody
End Sub
This works fine, as in it fills in all relevant fields in the email but the strBody text loses the Chr(13) = Carriage Return function and all the text is bunched up in one continuious line.
If I substitute the strEmail with the strBody string the text retains the Chr(13) = Carriage Return within the "To." field of the email.
Any help would be appreciated
Phil
First of all I'm only a part time user of Access code and would be in huge trouble if not for the help received from you guys here
My latest problem is with building an email and sending it to Lotus Notes, in short my code is as follows
Private Sub cboSendEmail_Click()
Dim strEmail, strBody, strSubject As String
strBody = strBody & "Dear " & txtName & Chr(13) & Chr(13)
strBody = strBody & "Below is the information you requested" & Chr(13) & Chr(13) & Chr(13)
strBody = strBody & "Name: " & txtSNO & Chr(13)
strBody = strBody & "Date: " & txtSNO & Chr(13)
strBody = strBody & "City, State, Zip: " & txtAddress & Chr(13)
strBody = strBody & "Outage Area: " & txtArea & Chr(13)
strBody = strBody & "Incident Number: " & txtINCD & Chr(13)
strBody = strBody & "Fault: " & txtFault & Chr(13)
strBody = strBody & "Outage Time" & txtTime
DoCmd.SendObject acSendNoObject, , "Rich Text Format", strEmail, , , strSubject, strBody
End Sub
This works fine, as in it fills in all relevant fields in the email but the strBody text loses the Chr(13) = Carriage Return function and all the text is bunched up in one continuious line.
If I substitute the strEmail with the strBody string the text retains the Chr(13) = Carriage Return within the "To." field of the email.
Any help would be appreciated
Phil