I have a ms-access database, now I need to build a search form on table "Samples" .
我有一个ms-access数据库,现在我需要在表“Samples”上构建一个搜索表单。
Now, the difficulties are I need 4 search criteria, SampleNo, SampleDate,SampleClient,SampleBatchNo.
现在,困难是我需要4个搜索条件,SampleNo,SampleDate,SampleClient,SampleBatchNo。
The search criterias can work together or not.
搜索标准可以一起工作或不一起工作。
I have a listbox to show the search results, and I want to be able to select more than one records in the results set and open a new form with the limitation of the selected records only.
我有一个列表框来显示搜索结果,我希望能够在结果集中选择多个记录并打开一个仅包含所选记录限制的新表单。
Thanks
1 个解决方案
#1
Shuolinq,
I answered a similar question yesterday here...
我昨天在这里回答了类似的问题......
Populate list box from a table in vba
从vba中的表填充列表框
The only difference between that question and this one is that your rowsource will have multiple of those "Like" lines, one for each of your possible search terms and each pointing to a different control.
这个问题和这个问题之间的唯一区别是你的rowsource将有多个“Like”行,每个可能的搜索词各有一个,每个都指向不同的控件。
As for the second part of your question...opening a form using the selected results...that is a lot tougher. It can be done but only with VBA code.
至于问题的第二部分......使用选定的结果打开一个表格......这更加困难。它可以完成,但只能使用VBA代码。
Seth
#1
Shuolinq,
I answered a similar question yesterday here...
我昨天在这里回答了类似的问题......
Populate list box from a table in vba
从vba中的表填充列表框
The only difference between that question and this one is that your rowsource will have multiple of those "Like" lines, one for each of your possible search terms and each pointing to a different control.
这个问题和这个问题之间的唯一区别是你的rowsource将有多个“Like”行,每个可能的搜索词各有一个,每个都指向不同的控件。
As for the second part of your question...opening a form using the selected results...that is a lot tougher. It can be done but only with VBA code.
至于问题的第二部分......使用选定的结果打开一个表格......这更加困难。它可以完成,但只能使用VBA代码。
Seth