December 31st, 2012, 10:30 AM
[RESOLVED] Attaching Sub Form to SMTP Message
I'm having a problem attaching a subform to an e-mail message. Before, I was sending the e-mail through outlook using DoCmd, but recently re-wrote the code to send through an SMTP server in order to avoid the annoying warning message. I want to attach a subform located with in the same database, called "5-Day Ticket Notification Subform", but I keep getting Runtime Error 438. I'm not sure if using .Attachments.Add is causing the error, or what. I've searched forums trying to find a solution, but have had no luck. Any help y'all can give will be much appreciated!
' Sends the e-mail
Set .Configuration = Conf
.To = Address
.CC = ""
.BCC = ""
.From = """Name"" <e-mail address>"
.Subject = "5-Day Notification"
.Attachments.Add Forms![5-Day Ticket Notification Subform]
.TextBody = StringBody
Tags for this Thread
Click Here to Expand Forum to Full Width