Easy way to filter a list Acc2020

frimy
frimy used Ask the Experts™
on
Hello All,
Using Access 2010

I have a customer list with the following info.
CustomerID , Name, Adrs1, Adrs2, Phone, Eamil and Etc.

is there a way to be able to filter with one Control field i.e.
i should be able to enter a part of the name or part of the adrs or phone in one unbound control and the system should find it.
i saw it in another program. can it be done with Access?
The right click on any column works only one column at a time.
Also i want to be able filter without right clicking.

in short i want to make my application more user friendly.
Thanks in advance
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2012
Top Expert 2014
Commented:
You'd have to create your own filter form if you want more control over the process. There are many examples of this around the internet, but essentially you add unbound textboxes (or combos, or listboxes) to a form (normally in the Header section), and then create your filter criteria when the user click a button (or some other action). For example:

Dim searchdata As String

If Nz(Me.txSearchName, "") <> "" Then
  searchdata = "First_Name LIKE '" & Me.txSearchName & "*'"
End If

If Nz(Me.txSearchCity, "") <> "" Then
  If Len(searchdata) > 0 Then
    searchdata = searchdata & " AND "
  End If
  searchdata = searchdata & "City LIKE '" & Me.txSearchCity & "*'"
End If

<and so on>

Me.Filter = searchdata
Me.FilterOn = True

Author

Commented:
Scot,

I was out of town and didn't get a chance to try it out.

it works very good after pressing the enter key.

is there a way to trigger the filter as I type a character without pressing the Enter key?
Thanks
Most Valuable Expert 2012
Top Expert 2014

Commented:
You can use the Change event of your textboxes to fire your Search code.

Author

Commented:
I m not sure what you mean.
I need is, as I type it should filter the list based on the characters I already typed without pressing the Enter key.
thanks

Author

Commented:
It works very good with after update
I also wanted to filter as I type but it looks that's to complicated.
Thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial