How to Filter for one word within a long field?

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

How do I run a Filter to find all entries having a field
containing one or two words among many others within that
same field? For example, If Field 8 includes a city and
a state (such as "Chicago, Illinois"), and I want to list
all entries which mention just the state (any entries
having Illinois in col. 8, regardless of city), how do I
craft the Filter by form, or how do I craft at Query?
 
SELECT *
FROM YourTable
WHERE Field8 Like "*Illinois*"

Check Access Help on Like and wildcards.

HTH
Van T. Dinh
MVP (Access)
 
Mike,
In a query, as criteria for Field8, write
Like "*" & [What are you looking for?] & "*"

In a form, have an unbound text control.
Code it's after update event:

' Watch the single quote placements
Me.Filter = "[Field8] Like '*" & [ControlName] & "*'"
Me.FilterOn = True
 
Back
Top