Access email works sometime not others

Mary Stroup 1 Reputation point
2022-01-28T01:01:50.153+00:00

Code to send an email from Access. Works sometimes, not others - with no code change. Sometimes it runs the code and then throws an error, after email have been sent successfully. I am not sure what the problem can be. It may be late binding? which i do not have a grasp of. No error message received. Just the whole block of html code is highlighted. Offending code is below.

strbody = "<html><head><title><b>2022 GIRLFRIEND GATHERING</b></title><style>body{margin-left: 20%;margin-right: 20%;" & _
"borders: 2px dotted black;;padding: 10px 10px 10px 10px;font-family: sans-serif;}</style></head>" & _
"<body>" & _
"<p>Dear " & rs!First & ",</p>" & _
"<p>We are very pleased that you will be joining us for our 2022 Girlfriend Gathering. This email is to confirm the receipt of your registration." & _
" Please let us know if you see any errors.</p>" & _
"<p>Name: " & rs!First & " " & rs!Last & "<br><br>Address: " & rs!Address & " " & rs!City & ", " & rs!St & " " & rs!Zip & "</p>" & _
"<p>Phone number: " & rs!Phone & "       Email: " & rs!Email & "<br><br>Emergency Contact: " & rs!EM_Contact & "       Emergency Phone: " & rs!EM_Phone & "</p>" & _
"<p>Church: " & rs!Church & "</p>" & _
"<p>Attending: " & rs!Attending & "<br><br><b>Session Choices: </b><br>1) " & rs!First_Choice & "<br>2) " & rs!Second_Choice & "<br>3) " & rs!Third_Choice & "</p>" & _
"<p>Food Selection: " & rs!Entree & "    " & rs!Sandwich & " " & rs!Salad & "     " & rs!Dressing & "     " & rs!Dessert & "     " & rs!Side & "</p>" & _
"<p><br>When you arrive at Chapel of the Cross, please go in the main door. You will be met by a member of the Registration Committee and will receive a bag with information as well as a nametag.</p>" & _
"<p><br>We are very glad you are taking this opportunity to meet with other women for fellowship, food, and fun, as we learn about Worrying Less and Praying More.</p>" & _
"<p>Blessings, The Registration Committee</p></body></html>"

Access Development
Access Development
Access: A family of Microsoft relational database management systems designed for ease of use.Development: The process of researching, productizing, and refining new or existing technologies.
859 questions
0 comments No comments
{count} votes