Searching A String Within a String

  • Thread starter Leviathan via AccessMonster.com
  • Start date
L

Leviathan via AccessMonster.com

I'm trying to determine if a unique string of data from one field exists in
another field. For example, the first column might have the values 12345, and
the second column might have the values ABC12345 or 12345ABC or AB12345C, etc.
The starting point of the matching string is random. How would I compare the
two?

Thanks!
 
L

Leviathan via AccessMonster.com

Used the search.

InStr function seems to be what I'm looking for.

Out of curiousity, are there any other functions that work?
 
J

John Spencer

WHERE FieldA LIKE "*" & FieldB & "*"

Would return all records where fieldB was contained in FieldA

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 

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