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!

How to filter out records that contain #

Status
Not open for further replies.

Janny

MIS
May 12, 2003
6
US
Hi,
I am having a problem that is probably fairly simple for most. I am trying to filter all of the records in a certain column of a database that contain the character #. That character is nomally followed by one or two alpha characters.

thanks
 
Normally, you could use 'LIKE' in the query to find a string. For example to find anything with 'W' you'd use this in the criteria of the query's field:

Like "*W*"

However, it won't work for the hash, as it's used by access to delimit dates.

Instead, add a calculated field to the query:

HasHash: InStr(1,[myField],"#")

and in the criteria enter:

<>0

Max Hugen
Australia
 
Like '*[#]*'

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top