Filtering using "contains"

I have a database table in Access 2003.  I have a column that has data like this:

HC, IC, HP, PO
IC, PO, EM
IC,
EM, PO, WE

What I need to do is filter the table to show all records containing HC or PO or EM

LiamMcKayAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Leigh PurvisConnect With a Mentor Database DeveloperCommented:
If they're all definitely only two characters then that should be all you need.
Often when that isn't the case it's a good idea to include the commas - to make sure you're hitting a string inside another :-)
0
 
mbizupCommented:
Hi LiamMcKay,

Try using like:

me.filter = "[YourField] LIKE '*HC*' OR [YourField] LIKE '*PO*' Or [YourField] LIKE '*EM*'"

(replace YourField with the application specific name)

0
 
Leigh PurvisDatabase DeveloperCommented:
lol - umm I think you missed?
I was just passing the time of day - stood here leaning on the metaphorical lamppost.

Miriam's Q surely.
0
 
mbizupCommented:
*Lol!*
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.