Memo Field not included in Email

sunrunner4kr

Registered User.
Local time
Today, 02:54
Joined
Apr 24, 2008
Messages
16
Hi

I have a save button on a form, when clicked creates an email. I've set it up to include the details from the form in the content of the email. But I have found the text limit of 255 is not enough.

So I have changed one of my fields to a Memo field. But when I try and include this in the email, it does not display the content.

Could anyone possibly give me some advice regarding including Memo fields in emails or whether I need to investigate another method?


Caption is the name of the Memo field and have set stCaption as the String.
All the other text box information displays perfectly.


Thanks!!!

here is my code:

Private Sub Save_Click()
On Error GoTo Err_Save_Click

Dim stSubject As String
Dim stTicketID As String
Dim stText As String
Dim stDocReport As String
Dim stMain As String
Dim stName As String
Dim stDate As String
Dim stEmail As String
Dim stBodyText As String
Dim stCaption As String
Dim stResponsibility As String

StrComputerName = FindComputerName()
StrWindowsUserName = FindUserName()

Combo98 = StrWindowsUserName

DoCmd.RunCommand acCmdSaveRecord

If Combo139 = "KLUG" Then

stEmail = "email address"
stDocReport = "EmailJobReportNew"
stTicketID = Me.[JOB REFERENCE]
stCaption = Me.[Caption]
stText = Me.[JOB TITLE]
stResponsibility = Me.[RESPONSIBILITY]
stName = Me.[RAISED BY]
stDate = Me.[DATE RAISED]
stSubject = "{NEW JOB} Ticket Ref: " & stTicketID & " JOB: " & stText
stMain = "Please find attached the New Job: " & stTicketID & " raised by " & stName & " on " & stDate & vbNewLine & vbNewLine & "COMMENTS:" & vbCrLf & vbCrLf & stCaption & vbNewLine & vbNewLine & "RESPONSIBILITY:" & vbNewLine & vbNewLine & stResponsibility
DoCmd.SendObject acReport, stDocReport, acFormatPDF, stEmail, , , stSubject, stMain

Else

stEmail = "email address"
stDocReport = "EmailJobReportNew"
stTicketID = Me.[JOB REFERENCE]
stBodyText = Me.[COMMENTS]
stText = Me.[JOB TITLE]
stResponsibility = Me.[RESPONSIBILITY]
stName = Me.[RAISED BY]
stDate = Me.[DATE RAISED]
stSubject = "{NEW JOB} Ticket Ref: " & stTicketID & " JOB: " & stText
stMain = "Please find attached the New Job: " & stTicketID & " raised by " & stName & " on " & stDate & vbNewLine & vbNewLine & "COMMENTS:" & vbCrLf & vbCrLf & stBodyText & vbNewLine & vbNewLine & "RESPONSIBILITY:" & vbNewLine & vbNewLine & stResponsibility
DoCmd.SendObject acReport, stDocReport, , stEmail, , , stSubject, stMain

End If

Exit_Save_Click:
Exit Sub

Err_Save_Click:
MsgBox Err.Description
Resume Exit_Save_Click

End Sub
 
Caption is actually a form property which by default is blank. So I suspect that your code is reading that instead of the field you want. So change the name of the textbox on your form to something else.

hth
Chris
 
THANK YOU!!!!!


This has been driving me crazy for days!!

I really appreciate your help!!
 

Users who are viewing this thread

Back
Top Bottom