按日期范围过滤报告 [英] Filter Report by Date Range

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

问题描述

我有一个包含选项组(fraReports)的表单,其中包含要打印的报表列表。这部分工作正常。我选择一个报告名称并单击打印并打开该报告。


现在我想添加一个文本框来输入服务日期,该日期将使用文本框值打开所选报告(服务日期)仅将报告过滤到那些日期。我有使用格式mmmm-yyyy的字段[Service_Date]。在我的所有表格和报告中,它将显示在2009年5月。


这是我正在使用的代码:

I have a form that has an option group (fraReports) which holds a list of reports to print. This part works fine. I select a report name and click print and that report opens.

Now I want to add a text box to enter a service date that will open the selected report using the text box value (service date) to filter the report to only those dates. I have the field [Service_Date] using the format "mmmm-yyyy" on all my forms and reports so it will show May-2009.

Here is the code I am using:

展开 | 选择 | Wrap | 行号

推荐答案

我不确定你究竟需要什么帮助。你的问题并不清楚,代码不构成(或替换)一个问题正确的问题。

Literal DateTimes及其分隔符(#)可能会有所帮助,并建议使用 WhereCondition 参数当使用 DoCmd.OpenReport


如果您需要更多帮助,请准确说明您的需求,我们将很乐意直接提供帮助。
I''m not sure what you actually need help with. Your question doesn''t make it clear, and code does not constitute (or replace) a properly asked question.

Literal DateTimes and Their Delimiters (#) may prove of some help, and a suggestion to use the WhereCondition parameter when using DoCmd.OpenReport.

If you need more help, please explain exactly what you need and we''ll be pleased to help more directly.


我不得不重新签名我在网站上无能为力。


基本上我有一个程序来跟踪寄养家庭安置。每个月我们都需要生成多个报告。


我想在选项组中列出报告。允许用户单击要打印的报告。


然后在此选项组下有一个文本框以允许输入服务日期,因此从上面的选项组中选择报告将仅打印在文本框中输入的服务日期。


到目前为止,我可以从选项组中选择要打印的报告,它将打开。我只需要添加到我的代码中以允许过滤服务日期。这样,当报告打开时,它将仅显示该服务日期的记录。我在这个字段[Service_Date]中使用的格式是使用格式mmmm-yyyy来允许它显示像2009年5月而不是整个日期。
I had to sign back up i could not do anything on the site.

Basically I have a program to keep track foster home placement. Every month we need to generate multiple reports.

I would like to have the list of reports in an option group. Allowing the user to click which report they want to print.

Then under this option group have a text box to allow input of a service date, so the report selected from the above option group will print for only the service date that was entered in the text box.

As of now I am able to select which report i want to print from the option group and it will open. I just need to add to my code to allow the service date to be filtered. That way when the report opens it will only show the records for that service date. The format i am using for this field[Service_Date] is using the format mmmm-yyyy to allow it to show up like this May-2009 instead of the whole date.


首先,尝试更改Where子句
First, try changing the Where Clause From:
展开 | 选择 | Wrap | 行号


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

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