在自动电子邮件代码中过滤报告 [英] Filter a report in an auto email code

查看:92
本文介绍了在自动电子邮件代码中过滤报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

展开 | 选择 | Wrap | 行号

推荐答案

早上好:


最好的方法是要使用基于参数查询的报表,该参数查询使用 WHERE 子句的表单控件值,然后使用 DoCmd.OutputTo


使用您发布的代码

- 在预览中打开报告 - 您可能需要显示报告...

- 删除对报表对象的显式调用。你已经预览了它。当使用对报告的显式调用时,该命令将该报告作为新运行打开,而不是当前打开,过滤的报告。 :)


- 你知道我通常建议在函数之外构建字符串,以便你有类似的东西:
Good Morning:

Best method is to have the report based upon a parameter query that uses the form control value for the WHERE clause then use the DoCmd.OutputTo

Using the code you''ve posted
- Open the report in preview - you may have to have the report visible...
- Remove the explicit call to the report object. You''ve already opened it in preview. When one uses the explicit call to the report, the command opens that report as a new run not as the currently open, filtered, report. :)

- You know I usually recommend building the strings outside of the function so that you have something like:
展开 | 选择 | Wrap | 行号


展开 | 选择 | Wrap | 行号


我得到了上面的工作,但现在得到一个错误
I got the above to work but getting an error now at
展开 | 选择 | Wrap | 行号


这篇关于在自动电子邮件代码中过滤报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆