Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

syntax for query criteria

Status
Not open for further replies.

dumdum2

Programmer
Mar 18, 2000
98
GB
I have an expression in a query that I hoped would pull records that include 'pw' (as a whole) in the displ_sub field, but my expression pulls records that only have a 'p' in the displ_sub field....I thought by using the quotes around "pw" would do the trick.....?

Expr1: InStr("pw",[displ_sub])

Thanks!
 
And what about this ?
Expr1: InStr([displ_sub],"pw")

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
You have your arguments reversed

Expr1: InStr("pw",[displ_sub])

says Find occurences of [displ_sub] in "pw"

You need

Expr1: InStr([displ_sub],"pw")

i.e. Find occurences of "pw" in [displ_sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top