how do I search for an * in a text field?

J

jahfish

how do I search for an * in a text field? I mean the character * (ASCII42)
rather than a wild card. I've tried 'like chr(42)' in the query parameter but
this returns reocrds that don't have a * in the text field
 
J

John Spencer

To find an asterisk anywhere in the field you would use
Like "*[*]*"
To find a field that is exactly on asterisk
= "*"
or use
Like "[*]"

The use of the square brackets tells the SQL engine to look for exactly what
is in the brackets or it lets you specify a range of characters. Check out
the wild card help - in the help dialog type "wild card"

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
 

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