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!

Search for invalid question marks in text 1

Status
Not open for further replies.

mkjjj

Technical User
Sep 10, 2013
6
US
We copy and paste text from Word into a database. What happens when cutting and pasting from Word, it replaces an apostrophe with a question mark so for example "you're" becomes "you?re" in the database. Is there a way to search for all question marks that are not correct in Crystal since sometimes a question mark is correct when a question is being asked? I have Crystal 9.

Thank you
 
Searching for a "?" is easy enough, but what would determine if it is in the correct position?

The following Code would return TRUE if a "?" was found:

Code:
If      Instr({Table.YourField}, "?") > 0 
Then    True
Else    False

Assuming that the only way a "?" could be in the correct position was if it was at the end of a sentence (ie, followed by a space), you could try:

Code:
If      Instr({Table.YourField}, "? ") > 0 
Then    True
Else    False

It would not exclude any where the apostrophe was correctly at the end of a word, and therefore followed by a space though.

Hope this helps
Cheers
Pete
 
Thanks Pete. I'm going to try it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top