Is there a way to filter using the # character in Access?

S

Stephanie70

I am trying to filter out all of the data with a # in the field on a form or
in a query. Is there a way to tell Access that I am looking for the
character not a date field?
 
B

Brendan Reynolds

The problem here is not that Access is interpreting the # character as a
date delimiter, but as a wildcard. To tell Access to treat the character as
a literal, enclose it in square brackets ...

SELECT tblTest.*
FROM tblTest
WHERE (((tblTest.TestText) Like "*[#]*"));
 
K

KARL DEWEY

Sound like you put dates in a text field. If want not to pull records with
the # character in the field here is one way to do it.

Make a query with criteria for the field -- Not Like "*"&"#"&"*"
 
Top