选择报告记录 [英] Selecting records for report

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

问题描述

我想允许用户选择要发送到报告的记录,但我的解决方案无法正常工作。 我正在关注这些文章 其中描述了基本相同的解决方案...


http://www.techrepublic.com/blog/how-do-i/how-do- i-select-records-for-a-dynamic-label-report-in-access /


http://support.microsoft.com/kb/207593


根据上述文章设置目前为止:


- 增加了"报告(Y / N)"。我的表中的字段,它根据表单上的复选框获取其值(-1或0)。


- 从搜索表单获取过滤条件并过滤表格的主查询使用"喜欢"语法。


- 搜索表单上的命令按钮打开"搜索结果"。基于主查询并且具有"按载时过滤"的表单属性设置为是。


- 搜索结果表单上的每个记录都有一个复选框,还有一个按钮,用于将所选记录发送到同样基于主查询的报告。


这就是它崩溃的地方......报告显示与"搜索结果"中返回的相同的过滤记录集。而不仅仅是那些被检查的形式。 我能想到的唯一解决方案是将搜索结果表单基于当前的
主查询,但是将报告基于主查询的副本但是具有 "True"的主查询。在"报告(Y / N)"中每个查询行的字段。 要做得更好。 任何想法为什么报告不尊重搜索结果表单上的
复选框? 对不起,如果这令人困惑。 如果您需要澄清,请告诉我。


解决方案

请为报告发布RecordSource的SQL字符串。


我不确定你如何使用提到的Like运算符???


  ;


I want to allow users to select records to send to a report but my solution isn't working as expected.  I'm following these articles which describe essentially the same solution...

http://www.techrepublic.com/blog/how-do-i/how-do-i-select-records-for-a-dynamic-label-report-in-access/

http://support.microsoft.com/kb/207593

Set up so far per the above articles:

- Added a "Report (Y/N)" field to my table which gets its value (-1 or 0) based on check boxes on a form.

- A main query which gets it's filter criteria from a search form and filters the table using "Like" syntax.

- Command button on the search form opens a "search results" form which is based on the main query and which has it's "Filter on Load" property set to yes.

- The search results form has a check box on each record and a button to send selected records to a report which is also based on the main query.

That's where it breaks down... the report displays the same filtered recordset as was returned in the "search results" form instead of only those that are checked.  The only solution I can think of is to base the search results form on the main query as it currently is, but base the report on a copy of the main query but which has "True" in the "Report (Y/N)" field for each query row.  Gotta be a better way.  Any ideas why the report doesn't respect the check boxes on the search results form?  Sorry if this is confusing.  Let me know if you need clarification.

解决方案

Please post the SQL String of the RecordSource for the Report.

I am not sure how you use the Like operator mentioned???

 


这篇关于选择报告记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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