当输入可以以任何格式发生时,如何根据用户输入过滤表单? [英] How to filter a form based on user input when the input can occur in any format?
问题描述
我有一个表单,它从文本框中的表中显示名为A_JobNo的列(例如值:E1Y4000)。有一个输入掩码应用于此texbox:
> L \-0A \-0000
使值显示为E-1Y-4000在表单上。
现在,我需要一个文本框/组合框,供用户在其中输入一个值,以便根据该值过滤表单。
我是什么我不知道如何应用过滤器,因为用户输入的值可以是任何格式。如何搜索记录输入或如何设置任何分隔符以便可以过滤值?
I have a form which displays a column named A_JobNo(e.g. value: "E1Y4000") from a table in a textbox.There is an input mask applied to this texbox:
>L\-0A\-0000
which makes the value appear like "E-1Y-4000" on the form.
Now, I need a textbox/combobox for users to enter a value in it so that the form is filtered based on that value.
What I am not able to understand is how do I apply filter as the value entered by users can be in any format.How do I search the record for the input or how to put any delimiter so that the value can be filtered?
推荐答案
请说明您是使用TextBox还是ComboBox,因为每个答案都非常不同。否则,问题很清楚。
Please clarify whether you are using a TextBox or a ComboBox as the answers to each are very different. Otherwise, the question is clear.
我希望在文本框中实现intellisense的提供。因为我不知道如何做到这一点,我现在正在使用一个组合框。 />
所以,它现在是组合框。
I wish to implement the provision of intellisense in the textbox.Since I have no idea how to do that, I am using a combobox right now.
So, it''s a combobox right now.
''我是vba中的新手,但是......他...... >
''让我试试这个..
''PS:设置你的表名和字段名。
''创建一个文本框将其重命名为txtboxSearch
''将此代码放入您的txtboxSearch代码中执行更改..
''im a newbie in vba but..hehe..
''let me try this..
''PS: set your tablename and fieldname.
''create a textbox rename it to txtboxSearch
''put this code in your txtboxSearch code in action Change..
这篇关于当输入可以以任何格式发生时,如何根据用户输入过滤表单?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!