Filter by selection

  • Thread starter msnews.microsoft.com
  • Start date
M

msnews.microsoft.com

I want to have an unbound text box that I type in text and when I click on a
command button it will filter all the records to just display the records
that contain the text that I typed in my unbound text box.

Pete Provencher
 
G

Guest

Create a custom filter and for the criteria of that filed use
[Forms]![NameOfForm]![NameOfTextbox]

behind your command button
DoCmd.ApplyFilter "filter name", ""
 
G

Guest

Or the way that I do it is to create a query and use it as a record source.
Within the where clause of the query put (example is for characters):

like "*" & [forms]![formname]![filter textbox name] & "*"

and within the after update event of the forms [filter textbox name] put:

DoCmd.Requery

It works pretty nicely...
 
G

Guest

The reason I use the filter method is for having multiple filtering options
on a form without using the Menu commands
for example active clients. Case manager that is logged into db
it would take 4 filter by selection using the menu bar filter commands.
I have multiple filter buttons for various filtering

My users prefer to use as little mouse/keystrokes as possible.

Lazy users

Tester said:
Or the way that I do it is to create a query and use it as a record source.
Within the where clause of the query put (example is for characters):

like "*" & [forms]![formname]![filter textbox name] & "*"

and within the after update event of the forms [filter textbox name] put:

DoCmd.Requery

It works pretty nicely...




msnews.microsoft.com said:
I want to have an unbound text box that I type in text and when I click on a
command button it will filter all the records to just display the records
that contain the text that I typed in my unbound text box.

Pete Provencher
 
P

Pete Provencher

Thank you very much. Worked perfectly.

Pete Provencher
Eric Blitzer said:
Create a custom filter and for the criteria of that filed use
[Forms]![NameOfForm]![NameOfTextbox]

behind your command button
DoCmd.ApplyFilter "filter name", ""



msnews.microsoft.com said:
I want to have an unbound text box that I type in text and when I click
on a
command button it will filter all the records to just display the records
that contain the text that I typed in my unbound text box.

Pete Provencher
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top