Code Problems

jeo

Registered User.
Local time
Today, 17:22
Joined
Dec 26, 2002
Messages
299
Problems with CRLF

I have a buttom that sends an e-mail once clicked. The problem is that each line is supposed to start on a new line in a body of an e-mail.
This is the code I used from this website and some of it works and some doesn't, meaning that the CRLF is not working and it's putting everything on 1 line. Can someone please take a look at it and let me know what I'm doing wrong. I have looked and looked and can't seem to figure out what is wrong.
The big block in the red is the one that is not recognizing CRLF.
Thank you for helping!
Private Sub Command54_Click()
'taken from http://www.access-programmers.co.uk/forums

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

Dim daBody As String
daBody = ""
daBody = daBody & "Type of Training: " & Forms!frmRequest!TypeofTraning & vbCrLf
daBody = daBody & "Request CT#: " & Forms!frmRequest![Request CT#] & vbCrLf
daBody = daBody & "Desired Start Date: " & Forms!frmRequest!DesiredDateRangeStart & vbCrLf
daBody = daBody & "Desired End Date: " & Forms!frmRequest!DesiredDateRangeEnd & vbCrLf
daBody = daBody & "Desired Quarter: " & Forms!frmRequest!Quarter & vbCrLf

daBody = daBody & "Client Company Name: " & Forms!frmRequest!ClientCompanyName & vbCrLf
daBody = daBody & "Client Contact Name: " & Forms!frmRequest![ClientContact Name] & vbCrLf
daBody = daBody & "Client Contact Phone: " & Forms!frmRequest!ClientContactPhone & vbCrLf
daBody = daBody & "Client Contact E-mail: " & Forms!frmRequest!ClientContactEmail & vbCrLf
daBody = daBody & "Requester Name: " & Forms!frmRequest!RequesterName & vbCrLf
daBody = daBody & "Requester Phone: " & Forms!frmRequest!RequesterPhone & vbCrLf
daBody = daBody & "Requester E-mail: " & Forms!frmRequest!RequesterEmail & vbCrLf
daBody = daBody & "Number of Traning Manuals: " & Forms!frmRequest!NumberofTraningManuals & vbCrLf
daBody = daBody & "Number of Class Participants: " & Forms!frmRequest!NumberofClassParticipants & vbCrLf
daBody = daBody & "Experience Level of Participants: " & Forms!frmRequest!ExperienceLevelofParticipants & vbCrLf


daBody = daBody & "Webex: " & Forms!frmRequest!Webex & vbCrLf
daBody = daBody & "Onsite: " & Forms!frmRequest!Onsite & vbCrLf
daBody = daBody & "Oniste Facility Address: " & Forms!frmRequest!OnisteFacilityAddress & vbCrLf
daBody = daBody & "Oniste Facility City: " & Forms!frmRequest!City & vbCrLf
daBody = daBody & "Oniste Facility State: " & Forms!frmRequest!State & vbCrLf
daBody = daBody & "Oniste Facility Zip: " & Forms!frmRequest!Zip & vbCrLf
daBody = daBody & "Oniste Facility Fiserv Training Region: " & Forms!frmRequest!FiservTraningRegion & vbCrLf
daBody = daBody & "Comments: " & Forms!frmRequest!Comments & vbCrLf

daBody = daBody & "Deviations from Standard Training Structure: " & Forms!frmRequest!DeviationsfromStandard & vbCrLf


DoCmd.SendObject acSendNoObject, , , "Frank.Smith@aol.com", , , "Resource Request for Allocation - Please review", daBody
 
Last edited:

Users who are viewing this thread

Back
Top Bottom