在当前表单上重新过滤 [英] Re-Filtering on a current form

查看:95
本文介绍了在当前表单上重新过滤的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是使用Access 2003的新手。我正在尝试将过滤器应用于表单,然后重新过滤再次形成记录。基本上我有我的主要表单,当我想过滤时,我点击一个按钮,弹出框出现几个列表。我从列表中选择了我想要的内容,然后单击弹出窗口上的按钮以执行过滤器。它会过滤我的主要表单,但是如果我想再次过滤以缩小我的搜索范围,那么我会做同样的事情并重置我的主表单并再次进行过滤。所以,如果我对苹果进行过滤然后为红色做一个我希望第二个过滤器拉出所有红色,苹果。不是一切都是红色的。这是我正在使用的代码。

Hi, I am a newbie using Access 2003. I am trying to apply a filter to a form and then re-filtering that forms records again. Basically I have my main form and when I wish to filter I click a button and a pop-up box comes up with several lists. I select what I want from the lists and click the button on the pop-up to perform the filter. It filters my main form, however if I want to filter again to narrow my search then I do the same thing and it reset my main form and does the filter again. So If I do a filter for "apples" and then do one for "red" I want the second filter to pull all the "red, apples" not everything that is red. Here is the code I am working with.

展开 | 选择 < span class =codeDivider> | Wrap | 行号

推荐答案

快速查看压缩数据库附件我已经根据你的帖子在这里提出。我不相信我理解你是如何使用这些数据的,因为你有许多列表都是针对相同的单列数据提供关键字所以它几乎是猜测但是控制的功能循环可能会让你感兴趣方法而不是有很多行来明确地引用列表。


如果你能更好地解释你的数据工作方法,那么我们也许可以提供帮助


问候


吉姆:)





Have a quick look at the zipped db attachment I''ve raised here based on your post. I am not convinced I understand how you are working this data as you have a number of lists all are targetting the same single column of data to provide the keywords so it is pretty much guesswork but the functional loop of controls might interest you in terms of method rather than having lots of lines to refer to the lists explicitly.

If you can be more explanatory on your method of working that data then we might be able to help

Regards

Jim :)
附加文件
Attached Files
< img class =inlineimgsrc =/ images / attach / zip.gifalt =文件类型:zipwidth =16height =16border =0style =vertical-align:baseline /> redbeard.zip (24.7 KB,54 views)
redbeard.zip (24.7 KB, 54 views)


好的,这里有更多解释。我有7个列表,每个列表中都有不同的术语。这些术语彼此相关,这就是为什么有7个列表而不是1个大的(更容易管理)。您可以从每个列表中选择任意数量的术语,它将在我的主要文本框中查找它们。主窗体上的文本框仅包含7个列表中的术语。我实际上有3个按钮,这个按钮或另一个做和,而最后一个做不。所以如果我选择苹果在列表1和红色之外在列表2之外并点击或按钮,我将获得包含红色的所有记录以及所有含有苹果的东西。如果我点击和按钮它只会给我包含红色的记录和苹果。而不是?按钮给了我所有不包含的记录?red?还是?苹果?这对我很有用。但是,我希望能够做到的是,过滤苹果。和红色点击和按钮。然后过滤Macintosh。使用不按钮,这会给我....红苹果不是Macintosh。在内部我目前得到的不是Macintosh的所有东西,因为它过滤原始形式而不是过滤形式。 (我使用水果作为一个简单的例子,我的术语要复杂得多)任何想法。
Ok, here is a bit more explanation. I have 7 lists each with different terms in them. The terms relate to each other that is why there are 7 lists instead of 1 big one (easier to manage). You can select as many terms from each list and it will look for them in a textbox on my main for. The textbox on the main form only holds terms that are in the 7 lists. I actually have 3 button, this one does "or" another does "and'' and the final one does "not". So if I select "apples" out of list 1 and "red" out of list 2 and hit the "or" button, I will get all records containing "red" and all the ones containing "apple". If I hit the "and" button it will give me only the records containing "red" and "apple". And the ?not? button gives me all records that don?t contain ?red? or ?apple?. This works great for me. However, I would like to be able to do is, filter for "apples" and "red" hitting the "and" button. Then filter for "Macintosh" using the "not" button, which would give me.... red apples that were not Macintosh. Inside I currently get everything that is not Macintosh, because it filters the original form and not the filtered one. (I am using fruit as a simple example, my terms are much more complex) Any thoughts.



好​​的,这里多一点说明。我有7个列表,每个列表中都有不同的术语。这些术语彼此相关,这就是为什么有7个列表而不是1个大的(更容易管理)。您可以从每个列表中选择任意数量的术语,它将在我的主要文本框中查找它们。主窗体上的文本框仅包含7个列表中的术语。我实际上有3个按钮,这个按钮或另一个做和,而最后一个做不。所以如果我选择苹果在列表1和红色之外在列表2之外并点击或按钮,我将获得包含红色的所有记录以及所有含有苹果的东西。如果我点击和按钮它只会给我包含红色的记录和苹果。而不是?按钮给了我所有不包含的记录?red?还是?苹果?这对我很有用。但是,我希望能够做到的是,过滤苹果。和红色点击和按钮。然后过滤Macintosh。使用不按钮,这会给我....红苹果不是Macintosh。在内部我目前得到的不是Macintosh的所有东西,因为它过滤原始形式而不是过滤形式。 (我使用水果作为一个简单的例子,我的术语要复杂得多)任何想法。
Ok, here is a bit more explanation. I have 7 lists each with different terms in them. The terms relate to each other that is why there are 7 lists instead of 1 big one (easier to manage). You can select as many terms from each list and it will look for them in a textbox on my main for. The textbox on the main form only holds terms that are in the 7 lists. I actually have 3 button, this one does "or" another does "and'' and the final one does "not". So if I select "apples" out of list 1 and "red" out of list 2 and hit the "or" button, I will get all records containing "red" and all the ones containing "apple". If I hit the "and" button it will give me only the records containing "red" and "apple". And the ?not? button gives me all records that don?t contain ?red? or ?apple?. This works great for me. However, I would like to be able to do is, filter for "apples" and "red" hitting the "and" button. Then filter for "Macintosh" using the "not" button, which would give me.... red apples that were not Macintosh. Inside I currently get everything that is not Macintosh, because it filters the original form and not the filtered one. (I am using fruit as a simple example, my terms are much more complex) Any thoughts.



为了解决问题,令我困惑的是7个列表所有效果都针对一列数据,我认为这些数据具有一种查找价值一列,所以如果''apples''在照片关键字列中自己是一个数据值,可以说20行,红色是15行,如果你知道哪个值最先出现想要使用''红色'的搜索条件然后''苹果''


你是否能够提供你所拥有的附件的缩减版本。难以猜测布局,同时我欣赏第二种解释,看到布局和小型工作模型更方便和有用。


问候


吉姆:)

In order to lay something out it was puzzling me about the 7 lists all effect targetting the one column of data which I assume had a kind of look up value in the one column so if ''apples'' was a data value on its own in the ''Photo keywords'' column lets say 20 rows down and ''Red'' was fifteen rows down how would you know which value came first if you were wanting to use the search criteria of ''Red'' and then ''Apples''

Are you able to provide a cut down version of what you have there as an attachment. Its difficult guessing the layout and whilst I appreciate the second explanation seeing a layout and a small working model is much more convenient and helpful.

Regards

Jim :)


这篇关于在当前表单上重新过滤的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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