如何使用Access 2000中的按钮过滤报告? [英] How to filter report using button in Access 2000?

查看:100
本文介绍了如何使用Access 2000中的按钮过滤报告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用一个查询创建一些报告,我希望从表单中的按钮进行程序过滤。我创建了一个名为q_ClientsHvServices的查询和一个名为Rpt_ClientsHvService的查询报告。在主窗体中,我创建了几个按钮来查看来自不同progrom的客户端。当我单击名为HACC的按钮时,报告应选择在以HA开头的PROGRAM(以及所有HA *)下具有服务的所有客户端。当我点击名为CACP的按钮时,报告应该选择以CAC开头的所有客户端。程序。可能吗?


如何根据点击按钮编写过滤器?


我的所有客户端上的代码按钮如下:

I need to create a few reports using one query and I wish to do the program filter from the buttons in a form. I had created a query named q_ClientsHvServices and a report based on that query named Rpt_ClientsHvService. In the main form, I created few buttons to view clients from different progrom. When I click on a button named "HACC", the report should select all the clients that have services under PROGRAM starting with HA (and all HA*). When I click on a button named "CACP", the report should select all the clients starting with "CAC" program. Is it possible?

How should I write the filter based on the click on the buttons?

My code on my "All client" button are as follow:

展开 | 选择 | Wrap | 行号

推荐答案


我需要使用一个查询创建一些报告,我希望从表单中的按钮进行程序过滤。我创建了一个名为q_ClientsHvServices的查询和一个名为Rpt_ClientsHvService的查询报告。在主窗体中,我创建了几个按钮来查看来自不同progrom的客户端。当我单击名为HACC的按钮时,报告应选择在以HA开头的PROGRAM(以及所有HA *)下具有服务的所有客户端。当我点击名为CACP的按钮时,报告应该选择以CAC开头的所有客户端。程序。可能吗?


如何根据点击按钮编写过滤器?


我的所有客户端上的代码按钮如下:

I need to create a few reports using one query and I wish to do the program filter from the buttons in a form. I had created a query named q_ClientsHvServices and a report based on that query named Rpt_ClientsHvService. In the main form, I created few buttons to view clients from different progrom. When I click on a button named "HACC", the report should select all the clients that have services under PROGRAM starting with HA (and all HA*). When I click on a button named "CACP", the report should select all the clients starting with "CAC" program. Is it possible?

How should I write the filter based on the click on the buttons?

My code on my "All client" button are as follow:

展开 | 选择 | Wrap | 行号



你需要为openreport参数的WHERE子句构建条件字符串,以便它知道要作为报告的一部分返回的记录

You need to build your criteria string for the WHERE clause of the openreport argument so that it knows the records to return as part of the report

展开 | 选择 | Wrap | 行号



我仍​​然无法做对。是因为我的报告中没有[程序]吗?代码是否控制查询的[程序]?

我的目的是知道从特定程序接收的客户端服务的编号,并从该结果中获取客户端名称列表。如果我把[程序]放到我的报告中,客户端数量将超出我的预期,因为它按程序分组,然后按客户端的名称分组。好吧,我曾试图让[程序]报告和测试代码,报告给了所有程序的所有客户。代码如下,你能找出出错的地方吗?

I still can''t get it right. Is it because I don''t have [Program] in my report? Does the code control the [Program] on Query?

My purpose is to know the number of the client received service from particular program and get a client name list from that result. If I put [Program] to my Report, the client numbers will be more than what I expected because it group by program and then by client''s name. Well, I had tried to put [Program] to report and tested on the code, the report gave all the clients from all the program. The code is as below, can you spot where goes wrong?

展开 | 选择 | Wrap | 行号


这篇关于如何使用Access 2000中的按钮过滤报告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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