Search for wildcards

  • Thread starter Thread starter Dave G
  • Start date Start date
D

Dave G

Hi Group...

In Access I have a large table of supplier addresses that I have extracted
from a system

Some of the names in the name field are preceded by *BLOCKED* including the
wildcard stars. E.g.

*BLOCKED* Bobs Pet Shop

I have two questions that someone in this knowledgeable group will be able
to answer very quickly.

What do I put in the search field if I want to search and replace *BLOCKED*
in all of the records... including the wildcard stars

and

In a query, if I want to identify those records that feature *BLOCKED* what
do I use as my criteria

Many thanks in advance
 
To find the word *BLOCKED*, use LIKE "*[*]BLOCKED[*]*" as your criteria.

If you're using Access 2000 or newer, you can use the REPLACE function to
change *BLOCKED* to something else. (Note that some versions of Access 2000
have a problem using the REPLACE function in a query, but there's an easy
work-around, which is to wrap your own function call around the built-in
REPLACE function.)
 
Thanks Doug... I'll give it a try

Douglas J. Steele said:
To find the word *BLOCKED*, use LIKE "*[*]BLOCKED[*]*" as your criteria.

If you're using Access 2000 or newer, you can use the REPLACE function to
change *BLOCKED* to something else. (Note that some versions of Access 2000
have a problem using the REPLACE function in a query, but there's an easy
work-around, which is to wrap your own function call around the built-in
REPLACE function.)

--
Doug Steele, Microsoft Access MVP

(No private e-mails, please)



Dave G said:
Hi Group...

In Access I have a large table of supplier addresses that I have extracted
from a system

Some of the names in the name field are preceded by *BLOCKED* including the
wildcard stars. E.g.

*BLOCKED* Bobs Pet Shop

I have two questions that someone in this knowledgeable group will be able
to answer very quickly.

What do I put in the search field if I want to search and replace *BLOCKED*
in all of the records... including the wildcard stars

and

In a query, if I want to identify those records that feature *BLOCKED* what
do I use as my criteria

Many thanks in advance
 
Back
Top