Auto E-Mail Message Text

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a db that I have set up so that when the user click a Com btn it will send a E-mail to the address in the record.

At this time I have it so the Email Address, Subject line work great. But when I get to the message text part of the code

[First Name] & "," & "Whats Up with your " & [Blueprint INFO], , Tru

I would like the text to look like this

Keit

Whats Up with your ca

I do not know how to get it to start a new line, Any help would be great!!

As is it now I get it all on one line like this

keith Whats Up with your ca

Thanks for any help that you can provide

here is the full code

Private Sub Command_26492_Click(
DoCmd.SendObject acSendNoObject, , , [EMailAdd], , , [First Name] & " " & [Blueprint INFO], [First Name] & "," & "Whats Up with your " & [Blueprint INFO], , Tru
End Sub
 
Give this a try ...

[First Name] & "," & Chr(13) & Chr(10) & Chr(13) & Chr(10) & <continue with
the rest of your message>

hth,
--
Cheryl Fischer
Law/Sys Associates
Houston, TX

KANOE said:
I have a db that I have set up so that when the user click a Com btn it
will send a E-mail to the address in the record.
At this time I have it so the Email Address, Subject line work great. But
when I get to the message text part of the code
[First Name] & "," & "Whats Up with your " & [Blueprint INFO], , True

I would like the text to look like this:

Keith

Whats Up with your car

I do not know how to get it to start a new line, Any help would be great!!!

As is it now I get it all on one line like this.

keith Whats Up with your car

Thanks for any help that you can provide.

here is the full code

Private Sub Command_26492_Click()
DoCmd.SendObject acSendNoObject, , , [EMailAdd], , , [First Name] & " " &
[Blueprint INFO], [First Name] & "," & "Whats Up with your " & [Blueprint
INFO], , True
 
Worked great!! Can you fell me How?????!!!!

I do not know what the Chr(13) ect. is doing???

Thanks!!!!!!!
 
Chr() is way of passing a character code - in code. IIRC, Chr(13) is the
Carriage Return and Chr(10) is the Line Feed. In building strings in VBA,
you can also use the VB constant, vbCRLF, to do the same thing.
 
WOW,

I think I get it. Just one more thing? I can now type my message, but only on one line. How can I get it so I do not need to type the message on just one line.

Thanks agin for your help!!!
 
You can continue typing on the next line by ending the first line with a space
and an underline.
Example:
"I want to continue this line" _
& "on the next line"
It will look like:
I want to continue this line on the next line

If you actually want two lines:
"I want to continue this line" & VbCrLf _
& "on the next line"
It will look like:
I want to continue this line
on the next line


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com



KAnoe said:
WOW,

I think I get it. Just one more thing? I can now type my message, but
only on one line. How can I get it so I do not need to type the message on just
one line.
 
Thanks, both of you have been a BIG HELP!!! It make this fun as I pick up more and more

Thanks agai

Keit
 
Back
Top