I
ID10Terror
Hi:
I am parsing some text that I receive thru emails (pairs) (city:
somehwere). Everything works except that I need a hard return added to the
field if the text is looooong (as in memo length). For some reason it will
not work. After I manually enter hard carriage returns in that field and
enter something (X), the parsing works fine. Can anyone help me with a
function that will go thru all the records of a certain field (fldMemo1).
make a hard return (ctrl + enter) add the letter X.
Thanks You
info:
Function ParseTextLinePair(strSource As String, strLabel As String)
Dim intLocLabel As Integer
Dim intLocCRLF As Integer
Dim intLenLabel As Integer
Dim strText As String
' locate the label in the source text
intLocLabel = InStr(strSource, strLabel)
intLenLabel = Len(strLabel)
If intLocLabel > 0 Then
intLocCRLF = InStr(intLocLabel, strSource, vbCrLf)
If intLocCRLF > 0 Then
intLocLabel = intLocLabel + intLenLabel
strText = Mid(strSource, _
intLocLabel, _
intLocCRLF - intLocLabel)
Else
intLocLabel = Mid(strSource, intLocLabel + intLenLabel)
End If
End If
ParseTextLinePair = Trim(strText)
End Function
I am parsing some text that I receive thru emails (pairs) (city:
somehwere). Everything works except that I need a hard return added to the
field if the text is looooong (as in memo length). For some reason it will
not work. After I manually enter hard carriage returns in that field and
enter something (X), the parsing works fine. Can anyone help me with a
function that will go thru all the records of a certain field (fldMemo1).
make a hard return (ctrl + enter) add the letter X.
Thanks You
info:
Function ParseTextLinePair(strSource As String, strLabel As String)
Dim intLocLabel As Integer
Dim intLocCRLF As Integer
Dim intLenLabel As Integer
Dim strText As String
' locate the label in the source text
intLocLabel = InStr(strSource, strLabel)
intLenLabel = Len(strLabel)
If intLocLabel > 0 Then
intLocCRLF = InStr(intLocLabel, strSource, vbCrLf)
If intLocCRLF > 0 Then
intLocLabel = intLocLabel + intLenLabel
strText = Mid(strSource, _
intLocLabel, _
intLocCRLF - intLocLabel)
Else
intLocLabel = Mid(strSource, intLocLabel + intLenLabel)
End If
End If
ParseTextLinePair = Trim(strText)
End Function