使用复选框和关键字搜索表单 [英] Search Form with Checkboxes and Keywords

查看:75
本文介绍了使用复选框和关键字搜索表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我需要搜索表单的帮助。我正在尝试根据关键字搜索表格。和MajorCategories;两个标准在表格中都有自己的字段。


表格中有一个关键字文本框,对应于每个主要类别的21个复选框,以及标记为全选的第22个复选框。用于选择所有21个复选框。


用户必须能够输入任意组合的关键字,并能够选择主要类别的任意组合。这可以用复选框吗?如果是这样,我该怎么做呢并为它编写代码?如果没有,是否有任何关于创建此类搜索表单的建议?


谢谢!

解决方案

我建​​议使用列表框两者都有可能。这样可以节省一些表格空间,可能看起来更清洁。要为主要类别选择全部,您可以考虑使用两个单选按钮。一个是他们想要从列表框中选择特定类别,另一个是想要选择所有类别。


从这次搜索中你打算如何打开信息?您是否打开另一个显示符合此条件的记录的表单。或报告或查询?


在这种情况下,我更喜欢使用关键字和是/否字段创建帮助表。

显示此信息数据表子表单允许用户选择所需的值,并允许添加或删除关键字的简单方法。

对于搜索,我只是使用原始表加入表并过滤临时表行是/否字段为真。

添加按钮(重新)设置所有关键字可以通过以下方式完成:


currentdb.execute(" ; UPDATE tblTemp SET YesNoField = True")


得到这个想法?


Nic; o)


< blockquote>


如果可能的话,我建议使用两个列表框。这样可以节省一些表格空间,可能看起来更清洁。要为主要类别选择全部,您可以考虑使用两个单选按钮。一个是他们想要从列表框中选择特定类别,另一个是想要选择所有类别。


从这次搜索中你打算如何打开信息?您是否打开另一个显示符合此条件的记录的表单。还是报告或查询?



我希望有一个子表格绑定到我正在搜索的表格。当然,该表具有主要类别。字段和关键字字段许多其他领域。


我不知道单选按钮是什么,我在Microsoft帮助搜索中找不到任何关于它的信息。另外,我真的不知道如何创建允许用户选择多个选项的列表框。谢谢你的帮助!


Hi everybody,

I need help with a search form. I''m trying to search a table based on "Keywords" and "MajorCategories"; both criteria have their own fields in the table.

The form has a "keyword" textbox, 21 checkboxes that correspond to each major category, and a 22nd checkbox labeled "Select All" used to select all 21 checkboxes.

The user has to be able to type in any combination of keywords and be able to choose any combination of major categories. Is this possible with check boxes? If so, how can I go about doing this and writing code for it? If not, are there any suggestions for creating this kind of search form?

Thanks!

解决方案

I suggest using listboxes for both if it''s possible. This would save some form space and possible look a little cleaner. To do the select all for major categories you could consider using two radio buttons. One if they want to select specific categories from your listbox and the other if they want to select all categories.

From this search what do you plan on opening the information as? Are you opening another form that will display the records that match this criteria. Or a report or query?


In a case like this I prefer to create a help table with the Keywords and a Yes/No field.
Showing this in a datasheet subform allows the user to select the values needed and allows also an easy way to add or remove keywords.
For the search I just JOIN the table with the original table and filter for temp table rows with the Yes/No field being true.
Adding a button for (re-)setting all Keywords ca be done by using:

currentdb.execute ("UPDATE tblTemp SET YesNoField = True")

Getting the idea ?

Nic;o)


I suggest using listboxes for both if it''s possible. This would save some form space and possible look a little cleaner. To do the select all for major categories you could consider using two radio buttons. One if they want to select specific categories from your listbox and the other if they want to select all categories.

From this search what do you plan on opening the information as? Are you opening another form that will display the records that match this criteria. Or a report or query?


I am hoping to have a subform that is bound to the table that I am searching. The table, of course, has the "major categories" field and the "keywords" field among many others.

I don''t know what a radio button is, and I can''t find any info about it in the Microsoft Help search. Also, I don''t really know how to create list boxes that allow users to choose multiple options. Thanks for your help!


这篇关于使用复选框和关键字搜索表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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