Using "&" in a filter for

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

The character & is not listed as a wildcard charater, and yet you cannot
search for a "&" character using something like *&* or even *[&]*. How do I
get around this problem?

Regards,
Leif
 
Putting [ ] around the & character is the right way to search for it.

Like "*[&]*"
 
OK, thanks.

I was not putting quotes around text string. That seems to be OK in most
cases, but not in this case.

Ken Snell said:
Putting [ ] around the & character is the right way to search for it.

Like "*[&]*"


--

Ken Snell
<MS ACCESS MVP>

Leif said:
The character & is not listed as a wildcard charater, and yet you cannot
search for a "&" character using something like *&* or even *[&]*. How do
I
get around this problem?

Regards,
Leif
 
Without the " characters delimiting the string, the query designer will
think [&] is the name of a field or parameter.

--

Ken Snell
<MS ACCESS MVP>

Leif said:
OK, thanks.

I was not putting quotes around text string. That seems to be OK in most
cases, but not in this case.

Ken Snell said:
Putting [ ] around the & character is the right way to search for it.

Like "*[&]*"


--

Ken Snell
<MS ACCESS MVP>

Leif said:
The character & is not listed as a wildcard charater, and yet you
cannot
search for a "&" character using something like *&* or even *[&]*. How
do
I
get around this problem?

Regards,
Leif
 
OK, but it does seem the handle the following:

*[#]*

without quotes in the filter For, finding all records that have a pound sign
in them.

Ken Snell said:
Without the " characters delimiting the string, the query designer will
think [&] is the name of a field or parameter.

--

Ken Snell
<MS ACCESS MVP>

Leif said:
OK, thanks.

I was not putting quotes around text string. That seems to be OK in most
cases, but not in this case.

Ken Snell said:
Putting [ ] around the & character is the right way to search for it.

Like "*[&]*"


--

Ken Snell
<MS ACCESS MVP>

The character & is not listed as a wildcard charater, and yet you
cannot
search for a "&" character using something like *&* or even *[&]*. How
do
I
get around this problem?

Regards,
Leif
 
Leif said:
OK, but it does seem the handle the following:

*[#]*

without quotes in the filter For, finding all records that have a pound
sign
in them.

That works not by design, but by fortunate happenstance. Always use " or '
characters to delimit text strings in queries.
 
Back
Top