chuckcoleman
Registered User.
- Local time
- Today, 17:09
- Joined
- Aug 20, 2010
- Messages
- 363
Hi, I'm feeling kind of dumb this morning. I have vba code that ultimately sends and email. The .Body of the vba has line continuation characters because of the length of the message that will be in the body of the email. I need an if-then statement to include some text or not. I'm getting various messages that something is wrong in my code. Here is what I say:
vba stuff _
& "This is to acknowledge that we " _
& "received your payment of " & Format([Amount], "Currency") _
If Me.CheckNbrX Is Not Null Then
" using check number " & Me.CheckNbrX & ". "
Else "."
End If
& " Your payment was for your property" blah, blah blah
Depending on what I try, I typically get Expected End of Statement or Expected Expression
I think the problem is that Access doesn't know what to do with the text strings. If I used MsgBox as part of this maybe that would work, but I can't. I'm creating the body of the email.
What am I doing wrong?
vba stuff _
& "This is to acknowledge that we " _
& "received your payment of " & Format([Amount], "Currency") _
If Me.CheckNbrX Is Not Null Then
" using check number " & Me.CheckNbrX & ". "
Else "."
End If
& " Your payment was for your property" blah, blah blah
Depending on what I try, I typically get Expected End of Statement or Expected Expression
I think the problem is that Access doesn't know what to do with the text strings. If I used MsgBox as part of this maybe that would work, but I can't. I'm creating the body of the email.
What am I doing wrong?