By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,730 Members | 1,540 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,730 IT Pros & Developers. It's quick & easy.

How to Filter Data using a Search Box?

P: 3
Hi everyone.

Im new here. I had been reading several topics in line with filtering, but i cannot find one related to my concern.

Please help me to create a command button that will filter my form using a Search Box.

I mean, the value that will be inputted in the Search Box will be used as the criteria to filter the form that i am dealing.

Thank you..
Nov 11 '11 #1
Share this Question
Share on Google+
4 Replies


Seth Schrock
Expert 2.5K+
P: 2,944
Is the Search Box on the same form that you want filtered or does the button open another form based on the Search Box?

Overall, the general principle is to create a query with the fields that you want shown in the form and the query has a criteria pointing to the search box. This is extremely simple if you are opening another form, but definitely doable either way.
Nov 11 '11 #2

P: 3
The search box is on the same form...
Nov 11 '11 #3

Seth Schrock
Expert 2.5K+
P: 2,944
You need to make your current form based on a query and then turn it into a subform and put the Seach box on the main form. The the query will have the Search Box as the criteria for the field that you are searching. Then all you have to do is in the After Update event of the Search box, add the following code:
Expand|Select|Wrap|Line Numbers
  1. Me.{Your subform name here}.Requery
Nov 11 '11 #4

NeoPa
Expert Mod 15k+
P: 31,606
Try out some of what you find in Example Filtering on a Form.
Nov 11 '11 #5

Post your reply

Sign in to post your reply or Sign up for a free account.