email formating and adding txtfirstname (1 Viewer)

mrrayj60

Registered User.
Local time
Yesterday, 21:02
Joined
Sep 3, 2009
Messages
103
This form button will send an email to this persons email address, its under onclick event-I would like skip a line or two and then add txtfirstname, txtlastname,txtaddress,txtaccount to the last part of the email, they are part of the form...any suggestions?

DoCmd.SendObject acSendNoObject, , , emailtxt, , , "Online Voting Registration", "Dear Homeowner, We have received your consent to online voting and you may now go to www.ballot.com and register to vote on the 2017 Budget, You will need to enter your First Name, Last Name, Street Address Account Number and Zip Code 34613 as we have provided it to the vendor,"
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 18:02
Joined
Aug 30, 2003
Messages
36,124
You can concatenate form values into the string:

"some fixed text" & Me.TextboxName & "more fixed text"

You can add line breaks with vbCrLf, like:

"some fixed text" & Me.TextboxName & vbCrLf & "more fixed text on next line"
 

mrrayj60

Registered User.
Local time
Yesterday, 21:02
Joined
Sep 3, 2009
Messages
103
Awesome reply, that did the job perfectly, thanks again - Ray

Dear Brookridge Homeowner,

We have received your consent to online voting and you may now go to www.ballot.com and register to vote on the 2017 Budget.
You will need to enter your First Name, Last Name, Street Address Account Number and Zip Code 34613 as we have provided it to the vendor.

RAY GEROUX 7300 Brookridge Central Blvd 100000
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 18:02
Joined
Aug 30, 2003
Messages
36,124
Happy to help! Don't know if you switched, but when text starts getting long like that I use a variable for it:

strBody = "some fixed text" & Me.TextboxName & "more fixed text"

DoCmd.SendObject acSendNoObject, , , emailtxt, , , "Online Voting Registration", strBody
 

Users who are viewing this thread

Top Bottom