无法打印过滤报告 [英] Can't Print Filtered Report

查看:68
本文介绍了无法打印过滤报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个表单来按姓氏选择记录。使用组合框选择名称后,我希望命令按钮打开一个只显示该记录(或那些记录)的报告。打开报告时,将显示所有记录。我不知道如何过滤与报告关联的查询,以便根据组合框中的选择(Access 2010)进行选择。感谢您的帮助!

I created a form to choose records by last name. After selecting the name with a combo box, I want the command button to open a report with just that record (or those records) showing. When it opens the report, all the records are showing. I don''t know how to filter the query associated with the report so that it selects according to the selection in the combo box (Access 2010). Thanks for any help!

推荐答案

您的报表所基于的查询需要有一个WHERE子句,它将您的姓氏字段与组合框相匹配。要引用该控件,语法为
The query that your report is based on needs to have a WHERE clause that matches up your Last Name field to the combo box. To reference the control, the syntax is
展开 | 选择 < span class =codeDivider> | Wrap | 行号


在查询中效果很好。查询和报告工作得很好,我无法工作的是我的搜索表单上的命令按钮。我从搜索表单的下拉框(组合)中选择一个名称,然后单击命令按钮,我想根据现在在组合框中显示的名称打开报告,但它只是显示并清空报告form ...我用那个命令按钮做错了什么?
That worked great in the query. The query AND the report work great, what I can''t get to work is the command button on my search form. I select a name from the drop down box (combo) on my search form, then I click the command button, which I want to open the report based on the name now showing in the combo box, but it just brings up and empty report form...what am I doing wrong with that command button?


很难说因为我看不到你的代码。请提供整个按钮的OnClick事件代码(使用代码标签。请参阅发布前(VBA或SQL)代码)。
Hard to say since I can''t see your code. Please provide your entire button''s OnClick event code (using Code tags. See Before Posting (VBA or SQL) Code).


这篇关于无法打印过滤报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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