From: John W. Vinson on
On Wed, 14 Apr 2010 05:17:30 -0700 (PDT), johnlute <jlute(a)marzetti.com> wrote:

>But why does Access have a problem with "#"? Are there any other
>characters that might cause a hiccup?

It's one of quite a few wildcard characters. * means "Any string of
characters", ? means "any single character", # means "any digit 0-9", and so
on. Since your query used the LIKE operator, it was looking for "Yellow 05" or
"Yellow 55" or "Yellow <some other digit>5". Enclosing the # in square
brackets tells Access to treat it as a literal instead of as a wildcard.
--

John W. Vinson [MVP]
From: johnlute on
Thanks for the clarification, John. I don't do much in the way of
these kinds of searches so I had no idea that there were so many
wildcard characters. This is definitely something to file away for
future reference. Thanks!

On Apr 14, 7:08 pm, John W. Vinson
<jvinson(a)STOP_SPAM.WysardOfInfo.com> wrote:
> On Wed, 14 Apr 2010 05:17:30 -0700 (PDT), johnlute <jl...(a)marzetti.com> wrote:
> >But why does Access have a problem with "#"? Are there any other
> >characters that might cause a hiccup?
>
> It's one of quite a few wildcard characters. * means "Any string of
> characters", ? means "any single character", # means "any digit 0-9", and so
> on. Since your query used the LIKE operator, it was looking for "Yellow 05" or
> "Yellow 55"  or "Yellow <some other digit>5". Enclosing the # in square
> brackets tells Access to treat it as a literal instead of as a wildcard.
> --
>
>              John W. Vinson [MVP]