Searching for '#'

J

J.R. Winder

Is there a way within Access 03 to search for a string of data that contains
a # symbol? I have a client that we reproduced a MS works db using Access
03. The client claims that within MS works they were able to search using
the # symbol....many of their historic recrods have the # within the record
name. My programmer tells me that searching in Access 03 is not possilbe
when including the # symbol and that revisions to his code will be needed.
The client obviously does not want to pay for these tweaks as they claim
they were able to search this way when using MS Works.

Any assistance is appreciated

JR Winder
Project Manager
 
F

fredg

Is there a way within Access 03 to search for a string of data that contains
a # symbol? I have a client that we reproduced a MS works db using Access
03. The client claims that within MS works they were able to search using
the # symbol....many of their historic recrods have the # within the record
name. My programmer tells me that searching in Access 03 is not possilbe
when including the # symbol and that revisions to his code will be needed.
The client obviously does not want to pay for these tweaks as they claim
they were able to search this way when using MS Works.

Any assistance is appreciated

JR Winder
Project Manager

Asked just 30 minutes earlier.

Surround the # with square brackets:
[#]
 
J

John W. Vinson

Is there a way within Access 03 to search for a string of data that contains
a # symbol? I have a client that we reproduced a MS works db using Access
03. The client claims that within MS works they were able to search using
the # symbol....many of their historic recrods have the # within the record
name. My programmer tells me that searching in Access 03 is not possilbe
when including the # symbol and that revisions to his code will be needed.
The client obviously does not want to pay for these tweaks as they claim
they were able to search this way when using MS Works.

Any assistance is appreciated

JR Winder
Project Manager

A criterion of

LIKE "*[#]*"

will find records containing an octothorpe anywhere within the string; a
criterion of

= "#"

will find records where the field consists of a single octothorpe.

What doesn't work as expected is

LIKE "*#*"

because the # character is itself a wildcard (matching any numeric digit); the
# will be interpreted as a wildcard. Only by enclosing it in brackets will it
be taken literally.
 
J

J.R. Winder

Perfect! Thank you so much

fredg said:
Is there a way within Access 03 to search for a string of data that
contains
a # symbol? I have a client that we reproduced a MS works db using
Access
03. The client claims that within MS works they were able to search
using
the # symbol....many of their historic recrods have the # within the
record
name. My programmer tells me that searching in Access 03 is not possilbe
when including the # symbol and that revisions to his code will be
needed.
The client obviously does not want to pay for these tweaks as they claim
they were able to search this way when using MS Works.

Any assistance is appreciated

JR Winder
Project Manager

Asked just 30 minutes earlier.

Surround the # with square brackets:
[#]
 

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