如何通过查询过滤表单

问题描述:

我的数据库有一个所有用户都使用的表单,我需要添加一个按钮来根据三个单独字段中的值过滤数据集。我尝试了一种非常简单的方法,然后进入高级过滤器,但无法真正弄清楚如何实现或。我需要的(即,如果三个字段中的任何一个是是,则在数据集中包括此记录)。我实际上不知道从哪里开始。 (字段都是Yes / No字段,如果有帮助的话。)


感谢您的帮助,你可以给我!

My database has a form which all the users use, and I need to add a button to filter the dataset based on the values in three separate fields. I tried a really simplistic approach, and went to Advanced Filter, but couldn''t really figure out how to achieve the "or" that I needed (i.e., include this record in the dataset if any of three fields is "Yes"). I actually have no idea where to start with this. (The fields are all Yes/No fields, if that helps any.)

Thanks for any help you can give me!




您可以像编写查询的WHERE部分一样指定过滤器。因此,在按钮的On Click事件中,您可以输入类似

Hi,

You can specify the filter just like how you would write out the WHERE part of a query. So in the On Click event for the button you can put something like

展开 | 选择 | Wrap | 行号


或者,作为FALSE值为零,您可以简单地使用以下过滤器:
Alternatively, as FALSE values are zero, you could simply use a filter of :
展开 | 选择 | Wrap | 行号


@NeoPa


啊-HA!这就是我想要尝试的东西(添加值)。我认为这就是我选择这个的方式。


好​​吧,但是现在我对最好的事情感到厌烦,因为zepphead80'是如此完整(关于盒子的条件非常有用的东西,我很好可能需要以后)和NeoPa'的答案是如此优雅!
@NeoPa
ah-HA! That''s the kind of thing I was thinking of trying (adding the values). I think that''s the way I''ll go for this one.

Okay, but now I''m torn about best-ing, since zepphead80''s was so complete (with the extremely useful stuff about conditions derived from boxes, which I very well may need later) and NeoPa''s answer is so elegant!