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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filter on text containing double quote

Status
Not open for further replies.

heppme

Technical User
Jun 14, 2002
18
US
I have to filter for text where it contains the double quote character in a query. I have found that the ASCII value is 34, but have been unable to apply it correctly within Access.
 
What is your current SQL view? How are you implementing the "where"?

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Here's the where clause:
WHERE (((PROJ.PROJ_NAME) Like "*[ampersand#34;]*") AND ((PROJ.LVL_NO)=4) AND ((PROJ.ACTIVE_FL)="Y") AND ((PROJ.ALLOW_CHARGES_FL)="Y"));

The ampersand is the character, not the word.
 
I've found an inelegant answer to my own question. I stopped checking for the double quote character within the text name and looked for found values off of a function:
InStr(1,[DELTEK_PROJ]![PROJ_NAME],Chr(34)))>0
 
Try
...WHERE (((PROJ.PROJ_NAME) Like "*""*")...

or
...WHERE (((PROJ.PROJ_NAME) Like "*" & Chr(34) & "*")...

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Thanks, the second one worked like a charm!
 
And what about this ?
... WHERE PROJ.PROJ_NAME Like '*"*' ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top