Email issue

S

stockwell43

Hello,

Sorry to report this but I really need some help. I am working on a database
that was someone else's and the manager clicks the email button on the form,
she wants it to also show the project name. I eventually figured out how to
do it and keep everything working properly. However, when the email opens the
cursor is at the beginning of the project name and I need it to start on the
next line. When I try to do it using the following code I get a complie
error, expected expression. The line that reads: MyMessage = Me.ProjectName &
vbCr & is highlighted in red. If I remove the & at the end the red goes away
ant the code works again but it doesn't drop the cursor to the next line.
Could someone please tell me what I am doing wrong? Any help would be most
appreciared!! Thank in advanced!

Private Sub cmdEmail_Click()
On Error GoTo EH
Dim SendTo As String, SendCC As String, MySubject As String, MyMessage
As String
SendTo = Me.AssignedTo

MySubject = "Project Information"
MyMessage = Me.ProjectName & vbCr &
DoCmd.SendObject acSendNoObject, , , SendTo, SendCC, SendBCC, MySubject,
MyMessage, True

EH:
If Err.Number = 2501 Then
MsgBox "This email message has not been sent. Message has been
cancelled."
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Email Issue 1
Email problem 5
BCC Email 3
SendObject Email 2
Send email from access form 3
Bold Code 2
Emailing information about a specific record 4
Emailing with field name in body of email 7

Top