我想从我的表“GetContact_TempTbl”中获取电子邮件地址并将报告发送到该电子邮件地址。此电子邮件将根据收到的公司而更改。我目前提取相关的电子邮件地址并将其存储在临时表中。我目前得到 Object Required 错误。
非常感谢您的建议。
Dim db As Database
Dim rs As Recordset
Dim stRecipients As String
Dim stDocName As String
Set db = CurrentDb()
Set rs = db.OpenRecordset("GetContact_TempTbl")
Set stRecipients = rs.Fields("Contact_Email")
stDocName = "License CODs"
stRecipietns = stRecipients
DoCmd.SendObject acReport, stDocName, acFormatPDF, stRecipients, , , "Thank You for your purchase"