The field has unreadable characters separating values. The unreadable character is an ascii 2 (or double quote).
I know the third character is always an ascii 2.
I open a recordset in vba. I want to replace the ascii2 with a pipe |
strSQL = "Select tsindex, tlindex, tbatch, trecbuffer from ewin_tlabel"
Set rs = DB.OpenResults(strSQL)
Dim txt As String
Dim fld As Integer
txt = rs.Value("trecbuffer")
fld = Asc(Mid$(txt, 3, 1))
If InStr(rs.Value("trecbuffer"), fld) > 0 Then
txt = Replace(txt, fld, "|")
End If
My syntax is off or something, because although fld does return the ascii2, my If..isn't returning anything.
Thanks.