DoCmd.SendObject带有子报告的电子邮件报告

问题描述 投票:-1回答:1

分两部分的问题:1.当我打印报告时,我的子报告没有显示。有这个窍门吗?2.当我使用以下代码时,它给我一个错误。我想通过电子邮件将包含2个子报告的主报告作为电子邮件发送给.pdf。

DoCmd.SendObject ([acSendReport],["AUS_Main"],[acFormatPDF],[[email protected]],,,[AUS Checklist and Orders],["Sir/Ma'am,", & vbln "Attached is my AUS checklist. I have read and understand all information on this document, and will reach out to HRO if I have any unanswered questions."]
vba ms-access subreport
1个回答
0
投票
  1. 否,整个报告应为PDF

  2. 考虑:

不需要[]字符。

电子邮件字符串必须用引号引起来。

邮件连接混乱。

vbln无效,请使用vbCrLf

DoCmd.SendObject acSendReport, "AUS_Main", acFormatPDF, "[email protected]", , , _
     "AUS Checklist and Orders", "Sir/Ma'am, " & vbCrLf & "Attached is my AUS checklist. I have read and understand all information on this document, and will reach out to HRO if I have any unanswered questions."
© www.soinside.com 2019 - 2024. All rights reserved.