I apologize -- I edited my code to show that the value of msg was created in advance. In fact, my code is written as you suggested, with msg set after FName.
The problem is not in the SendMail function -- it is that the string is not being processed with the concatenation operators and the...
If I hard code the message text in the code, it works fine. The problem is when I try to pull the exact same string from a text field in the database. Is it a quoting problem?
msg="Dear " & FName & ", " & vbCRLF & " blah..."
' msg is pulled form database table
With rs1
.MoveFirst
Do While Not rs1.BOF And Not rs1.EOF
If Not IsNull(!EMail) Then
Resp = MsgBox("OK to Process EMail Message?", vbOKCancel)
If...
I have an Access application with a home-built email generator. It pulls the text of the message from a table. The message text includes variable names that are set by a program. For instance
msg="Dear " & FName & ", " & vbCRLF & " blah..."
FName = "Bill"
Now, msg is pulled correctly from...
This is an execllent example, and I have a question about extending it. What if you want to use want to use wildcards or regular expressions which would return more than one record, then allow the user to choose their desired match?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.