是否有一种方法可以自动通过电子邮件发送表单,如访问中所示 [英] Is there a way of automatically emailing a form as it appears in access
问题描述
您好。如果有人能在我介入之前给我一个快速指针,我将非常感激。
我想自动通过Access中的表单发送数据。我理想的结果将是表单的图像,以便收件人看到我在Access中看到的内容。
我怀疑,从我读过的(以及使用DoCmd.SendObject经历过)来看,这是不可能的。相反,尝试通过电子邮件发送表单将以文本或excel格式输出整个基础表。
如果表单无法以看到的格式通过电子邮件发送,那么我的接下来的方法是创建报告,应用适当的过滤器,然后以快照格式发送该报告。
是否有人对此有任何意见/建议可能有帮助吗?
Hi. If anyone can give me a quick pointer before I get involved in this, I would greatly appreciate it.
I would like to automatically email data from a form in Access. My ideal outcome would be an image of the form so that the recipient sees what I see in Access.
My suspicion, from what I have read (and experienced using DoCmd.SendObject), is that this is not possible. Rather, trying to email a form will output the whole underlying table in either text or excel format.
If a form cannot be emailed in the ''as seen'' format, then my next approach would be to create a report, apply an appropriate filter, and then email that report in ''Snapshot Format''.
Does anyone have any views/suggestions on this that might be of help?
推荐答案
我已经能够使用DoCmd.SendObject命令的快照格式发送报告,但有一个小问题。
要发送电子邮件,请执行以下操作:
打开报告
应用过滤器报告>
DoCmd.SendObject
但是,我发现除非我在调用SendObject命令之前在代码中插入或插入消息框,否则报告将被邮寄而不会有报告已过滤。
任何想法为什么会这样?
I''ve been able to email reports using the ''Snapshot Format'' of the DoCmd.SendObject command, with one slight problem.
To send the email I do the following:
Open report
Apply filter to report
DoCmd.SendObject
However, I find that unless I put a break in the code or insert a message box before calling the SendObject command the report is mailed without having had the report filtered.
Any ideas why that might be?
试试这个...
Try this ...
谢谢,玛丽。实际上,这就是我用来生成报告的代码。我真正担心的是双重问题:
- 有没有办法通过电子邮件发送报告/表格而不是使用快照查看器(我正在处理Mac和Windows)
- 为什么报告没有正确过滤,除非我在过滤器和DoCmd.SendObject命令之间放了一个msgbox提示符。
Thanks, Mary. Actually, that is the code I''m using to generate the report. My real concern is twofold:
- Is there a way of emailing a report/form other than using snapshot viewer (I''m dealing with Macs and Windows)
- Why the report does not filter correctly, unless I put a msgbox prompt between the filter and the DoCmd.SendObject command.
这篇关于是否有一种方法可以自动通过电子邮件发送表单,如访问中所示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!