Hi all:
This has been my downfall since starting a project that includes several items within the DB that use a tick mark (') for names and such.
I can do a strict find and replace, but then when I pass that value as an argument, it returns 0 records.
This is what I'd like to do:
[code}
Dim Pos As Integer
Dim s As String, t As String
Pos = InStr(0, Record, "'")
If Pos > 0 Then
s = Left(Record, Pos)
t = Replace(Record, "'", "/''/")
....
End If
[/code]
Is my syntax correct for this?
Any help will be greatly appreciated.
Thanks,
Ron Repp
If gray hair is a sign of wisdom, then I'm a genius.
This has been my downfall since starting a project that includes several items within the DB that use a tick mark (') for names and such.
I can do a strict find and replace, but then when I pass that value as an argument, it returns 0 records.
This is what I'd like to do:
[code}
Dim Pos As Integer
Dim s As String, t As String
Pos = InStr(0, Record, "'")
If Pos > 0 Then
s = Left(Record, Pos)
t = Replace(Record, "'", "/''/")
....
End If
[/code]
Is my syntax correct for this?
Any help will be greatly appreciated.
Thanks,
Ron Repp
If gray hair is a sign of wisdom, then I'm a genius.