SendObject with MessageText

Treisio

Registered User.
Local time
Today, 10:13
Joined
May 21, 2013
Messages
12
At first, I thought this task would be simple, but it has proved otherwise. Basically, I want the MessageText argument to be autofilled with whatever value the combobox in the form holds. This is my code so far...
Code:
Private Sub Command54_Click()

Dim EmailText As String
EmailText = "Submitted By: " & vbNewLine & vbNewLine & "Description: " & vbNewLine & vbNewLine & "Subject: "

If Combo18.Value = 1 Then

DoCmd.SendObject acSendNoObject, , , "knagel@durablepackaging.com", , , , EmailText, True
For instance, after "Submitted By: " I want the value from the combobox: Submitted By in the form to be automatically placed there. Please help me, I am completely clueless.
 
Last edited:
EmailText = "Submitted By: " & Me.ComboName & ...
 
This is an example why you must avoid to use spaces, or other non alphanumeric characters in a name.
Change the name for the combo from Submitted By to Submitted_By (or SubmittedBy) and will be a simple task to achieve what you are trying to do:
Code:
EmailText = "Submitted By: " & Submitted_By & vbNewLine & .....
 

Users who are viewing this thread

Back
Top Bottom