创建过滤的表单并搜索值 [英] Creating a Filtered Form and Searching Values

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

问题描述

我有一个表,我希望能够让用户搜索/过滤。

我有多个要搜索的字段:

[DATA_OWNR]

[REC_ID]

[SERL_CD]

[日期]


我构建了一个表单,我希望他们能够选择形成一组下拉标准来过滤。然后它在子表单中显示符合该条件的记录。


我最初在我正在搜索的表上创建了一个选择查询。使用Dlookups显示每个相关字段的下拉值。


我可以很好地填充所有东西,但我不知道如何取消选择字段返回所有值(即如果他们没有选择DATA_OWNER,则不应该按该值过滤)。


有关如何执行此操作的任何想法?我是否需要以不同的方式执行此操作?

解决方案

如果该字段为空白,则该字段返回星号*


这对NULL字段不起作用。


要解决这个问题,你必须更改查询def。


< blockquote class =post_quotes>
如果该字段为空,则该字段返回星号*


这对NULL字段不起作用。


为了解决这个问题,你必须改变查询def。



感谢您的帮助。我只是有几个问题?


1)更改查询定义是什么意思?要什么?

2)要让它发送一个星号,你的意思是,只需将下拉列表的默认值更改为星号吗?



感谢您的帮助。我只是有几个问题?


1)更改查询定义是什么意思?要什么?

2)要让它发送一个星号,你的意思是,只需将下拉列表的默认值更改为星号吗?



1)每个查询都有一个查询定义。使用代码可以更改查询定义的.SQL属性。


2)这是一种方法。


I have a table that I would like to be able for the users to search/filter.
I have multiple fields to search:
[DATA_OWNR]
[REC_ID]
[SERL_CD]
[DATE]

I built a form, and I would like them to be able to choose form a set of drop-downs which criteria to filter on. and then it show in the sub-form the records that match that criteria.

I initially created a select query on the table I''m searching. With Dlookups of the drop-down values for each of the relevant fields.

I can do it fine with all things being populated, but I Don''t know how to make an unselected field return all values (i.e if they don''t select a DATA_OWNER, it should not get filtered by that value).

any ideas on how to do this? Do I need ot do it a different way?

解决方案

Have the field return an asterisk * if it''s blank.

This does not work on NULL fields.

To get around that you''ll have to change the query def.


Have the field return an asterisk * if it''s blank.

This does not work on NULL fields.

To get around that you''ll have to change the query def.

Thanks for your help. I just have a couple of questions?

1) What do you mean by changing the query definition? To what?
2) To have it send an asterisk, do you mean, to simply change the default value of the drop-down to an asterisk?


Thanks for your help. I just have a couple of questions?

1) What do you mean by changing the query definition? To what?
2) To have it send an asterisk, do you mean, to simply change the default value of the drop-down to an asterisk?

1)Every query has a query definition. Using code you can change the query definition''s .SQL property.

2) That''s one way of doing it.


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

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