搜索表格代码 [英] Search Form Code

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

问题描述

我有一个包含所有零件信息的主表,它有包含零件号,日期,缺陷的列......

我正在尝试为我的搜索编写代码表单。

i在Access上创建了一个搜索表单,它有5个组合框用于:

部件号

缺陷



组装而其他2个组合框用于来自和到日期范围。我已经为日期范围制作了组合框,以便在点击时显示日历并选择日期。


i一直在尝试编写一个代码,只需要填写其中一个字段out,它可以过滤我的主表。

i会感谢任何帮助这个

谢谢

i have a master table with all my part information, and it has columns with part number, date, defects,...
and i am trying to write a code for my search form.
i have created a search form on Access, and it has 5 combo boxes for:
part number
defects
assembled by
and the other 2 combo boxes are for "from" and "to" date range. i have made the combo boxes for the date range to display a calendar when clicked and choose a date.

i have been trying to write a code that only requires one of these fields to be filled out and it can filter my master table.
i would appreciate any help on this
Thanks

推荐答案

检查表格上的示例过滤


当你玩游戏时,请告诉我们你是否还有什么不确定之处。您可以更清楚,更具体地了解您正在努力解决的问题,我们能够更快速,更轻松地为您提供帮助。
Check out Example Filtering on a Form.

When you''ve had a play, let us know if there is anything you still feel unsure about. The more clear and specific you can be about what you''re struggling with, the more quickly and easily we we be able to help you.


感谢NeoPa提供的信息,文章提供一些有用的提示。但我对我的代码有一些疑问。

1)在我的搜索表单中我有一个日期范围,它由每个来自的组合框组成。和到单击它们时,会弹出一个日历并可以选择日期。我的问题是,如何在这两个日期之间搜索我的主表中的任何条目?因为我相信上面提供的代码只是为了选择输入的确切日期。


2)在我的第二个组合框中,我试图根据缺陷过滤我的主表进入搜索。但是在我的主表中我有3列缺陷(标记为缺陷1,2,3),因为某些部分有多个缺陷。如何让我的代码搜索输入搜索字段的缺陷的所有3列?

它是这样的:

Thanks NeoPa for the info, the article provides some helpful hints. however i do have some questions about my code.
1) in my search form i have a date range, which is made up of a combo box at each "from" and "to" when they are clicked a calendar pops up and a date can be picked. my question in regards to this is, how can i do a search of my master table of any entry in between these 2 dates? because i believe that the code u provided above was only meant to pick the exact date entered.

2)in my second combo box, im trying to filter my master table according to the defect entered into the search. however in my master table i have 3 columns for defects (labeled defect 1, 2, 3)since some parts have more than one defect. how can i make my code search all 3 columns for the defect entered into the search field?
would it be something like this:

展开 | 选择 | Wrap | 行号


还有一件事。我试过操纵你的代码以适应我的,但是因为我使用命令按钮进行搜索,所以似乎没有什么可以解决的。在我尝试修复所有内容后,单击并保存,退出并运行代码。但它没有用
one more thing. i have tried manipulating your code to fit mine, but since im using a command button for my search,nothing really seemed to work out. after i tried to fix everything to on click and saved, exited and ran the code. but it didnt work


这篇关于搜索表格代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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