过滤器 [英] Filters

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

问题描述

我想知道如何插入代码以将过滤器应用到表单而不是在表单上使用表单过滤器。


谢谢

I was wondering how I can go about inserting code to apply filter''s to a form rather than using the filter by form on the form itself.

Thank you

推荐答案

使用DoCmd.OpenForm函数时,第四个参数是 WhereCondition


退房帮助中的完整详细信息。
When using the DoCmd.OpenForm function, the fourth parameter is WhereCondition.

Check out the full details in Help.


它实际上是一个两步过程:
It is actually a 2-Step process:
  1. 设置表单的过滤属性:
  1. Setting the Filter Property of the Form:
展开 | 选择 | Wrap | 行号


这提高了你想要应用过滤器的时间点。


如果你想打开预先准备过滤器的表格,那么我之前的回答是你需要什么。


但是,如果您希望从表单本身的代码中动态更改过滤器,那么ADezii的响应就是您所需要的。


无论如何你现在都有 - 无尽的财富;)
This raises the point of when you want to apply the filter.

If you want to open the form with a pre-prepared filter applied then my earlier response is what you need.

If, however, you want, from within the code of the form itself, to change the filter dynamically, then ADezii''s response is what you require.

Now you have both anyway - untold riches ;)


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

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