如何在查询中应用过滤器? [英] How to apply filter in a query?

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

问题描述

我有一个查询名称ICISquery,表字段名称是员工的ARE,日期,项目描述和备注。

员工的表字段ARE是员工的名称。

ICISquery有10000条记录。我有一个表单名称(home),在这个表单中有一个combolist,它的行源是员工的名字。我在数据表视图中有另一个表单名称(列表)。当我点击combolist中的一个员工时,列表表格将显示,其记录源为ICISquery。但我希望ICISquery只显示我点击的员工的记录。例如,我单击Juan Reynulfo,列表表单将显示并仅包含Juan Reynulfo的记录。这是查询中过滤器的工作吗?如果是这样,当你调用它时,如何在查询中应用这个过滤器?

I have a query name ICISquery, table field names are ARE of Employee, Date of ARE, Item Description and Remarks.
The table field ARE of Employee is a name of employee.
ICISquery has a 10000 records. I have a form name (home) in this form has a combolist and its row source are the name of employees. I have another form name (list) in datasheet view. when i click one of the employee in combolist, the list form will show up and its recordsource is ICISquery. But i want ICISquery will show only the records of employee i have clicked. For example, i click Juan Reynulfo, the list form will show up and contains only the records of Juan Reynulfo. Is this the work of filter in a query? If so, how can i apply this filter in query when you call it?

推荐答案

你好,再次,eneyardi。

幸运的是你我从这个帖子知道你想要什么:
如何缩短使用if,else和end if的代码?

因为从实际线程我无法理解:)。


因此,一种方法是制作一个新的模块(或使用现有的模块。

在此模块中delare a PUBLIC 变量。说 strName 并创建 PUBLIC 函数(比如 fGetName

这样的东西:
Hi again, eneyardi.
Fortunately for you I know what you wish from this thread:
How to shorten codes that using if, else and end if?
Because from actual thread I can''t understand :).

So, one way to do this is to make a new module (or use an existing one.
In this module delare a PUBLIC variable. Say strName and create a PUBLIC function (say fGetName)
Something like this:
展开 | 选择 < span class =codeDivider> | Wrap | 行号


这当然是一种做法,在某些情况下可能非常有用。


我只会提供另一种方法:


假设您已初步设置报告以显示所有记录所有员工。你也可以选择打开报告并同时应用过滤器。


这可以这样做,假设你有一个简单的组合框(comboSelectName),只列出名称:
That is certainly one way of doing, and under some circumstances can be very usefull.

I will just for good measure mention another way of doing it:

Presume you have your report set up intially to show all records of all employees. You can also choose to open the report and apply the filter at the same time.

This could be done like so, presuming you have a simple combobox (comboSelectName) listing just the name:
展开 | 选择 | Wrap | 行号


这正是我正在寻找的。感谢你们!我很高兴将它应用到我的简单程序中,我会在稍后给你更新。
That''s exactly what i''m looking for. thank you guys! I''m excited to apply that on my simple program, I''ll give you the update later.


这篇关于如何在查询中应用过滤器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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