Locate the " " " (inch) in a string

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I cannot seem to find a way to locate a field with a " in it. I guess you
call those DOUBLE QUOTES? It don't matter to me if we use the InStr or the
Like way..I just need to hone in on when my idiot users put them in the part
description.
 
If you want to use Find and Replace to change all " to inches, it isn't too
hard to do.

To find " using a query is more work. I couldn't figure it out using Like
but got InStr to do the job.

SELECT InStr(1,[TextField],'"') AS Expr1, Inches.TextField
FROM Inches
WHERE (((InStr(1,[TextField],'"'))>0));
 
Been there, Done that...got "The Expression you entered has an invalid
String. A string can be up to 2048 charaters long, including opening and
closing quotation marks.

Jerry Whittle said:
If you want to use Find and Replace to change all " to inches, it isn't too
hard to do.

To find " using a query is more work. I couldn't figure it out using Like
but got InStr to do the job.

SELECT InStr(1,[TextField],'"') AS Expr1, Inches.TextField
FROM Inches
WHERE (((InStr(1,[TextField],'"'))>0));
--
Jerry Whittle
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


Dirtbike said:
I cannot seem to find a way to locate a field with a " in it. I guess you
call those DOUBLE QUOTES? It don't matter to me if we use the InStr or the
Like way..I just need to hone in on when my idiot users put them in the part
description.
 
With Instr? No problem.

InStr(StringName, Chr(34))

Sam

Jerry said:
If you want to use Find and Replace to change all " to inches, it isn't too
hard to do.

To find " using a query is more work. I couldn't figure it out using Like
but got InStr to do the job.

SELECT InStr(1,[TextField],'"') AS Expr1, Inches.TextField
FROM Inches
WHERE (((InStr(1,[TextField],'"'))>0));
I cannot seem to find a way to locate a field with a " in it. I guess you
call those DOUBLE QUOTES? It don't matter to me if we use the InStr or the
Like way..I just need to hone in on when my idiot users put them in the part
description.
 
I cannot seem to find a way to locate a field with a " in it. I guess you
call those DOUBLE QUOTES? It don't matter to me if we use the InStr or the
Like way..I just need to hone in on when my idiot users put them in the part
description.

Like '*"*'
 
LIKE '*"*'
or
LIKE "*""*"

When you need to use a quote or an apostrophe in a string, you double them
up. Or use one type on the outside and the other type on the inside.
 
Dirtbike said:
I cannot seem to find a way to locate a field with a " in it. I guess you
call those DOUBLE QUOTES? It don't matter to me if we use the InStr or the
Like way..I just need to hone in on when my idiot users put them in the part
description.
 
Instr(textfield, """")

also works fine. Make sure there are TWO double quotes between the outer ones.

Tom Lake
 
Back
Top