Finding question marks in a field...?

  • Thread starter Thread starter Bobby C.
  • Start date Start date
B

Bobby C.

I am trying to write a simple query (using Microsoft Access 97) to find an
record where the field name ClassNumber (Text field) contains a question
mark. I've tried a few iterations of this (using InStr function, etc.) and
Access keeps treating the question mark as a wildcard. Anyone have an idea
how to make this work?
 
I am trying to write a simple query (using Microsoft Access 97) to find an
record where the field name ClassNumber (Text field) contains a question
mark. I've tried a few iterations of this (using InStr function, etc.) and
Access keeps treating the question mark as a wildcard. Anyone have an idea
how to make this work?

To search for a wildcard character, enclose it in square brackets to
tell JET to treat it as a literal character instead:

LIKE "*[?]*"
 
John said:
I am trying to write a simple query (using Microsoft Access 97) to
find an record where the field name ClassNumber (Text field)
contains a question mark. I've tried a few iterations of this
(using InStr function, etc.) and Access keeps treating the question
mark as a wildcard. Anyone have an idea how to make this work?

To search for a wildcard character, enclose it in square brackets to
tell JET to treat it as a literal character instead:

LIKE "*[?]*"

BINGO...!

Thanks very much...
 
A stuffed bear for the "teddy bear" of the MVPs.....!

< g, d, & r >

Oh, there are plenty of MVP's that are more huggable than me!

<g, d, & r the other way>
 
John said:
Does that mean I win the stuffed bear? Goody!

I'm sorry John. In looking at your scorecard you only had BING and not
BINGO, so no stuffed bear for you. Keep trying though <g>...

Thanks again...
 
Back
Top