Try this modified code structure:
Dim strRow as String, intF as Integer, strLine as String
Dim blnFullLine As Boolean
'code deleted for brevity that opens the text file and reads column
names
strRow = ""
blnFullLine = False
blnBuilding = False
Do While EOF(intF) = False
Line Input #intF, strLine
If Right (strLine, 1) = char(34) Then
strRow = strRow & strLine & Char(13)
blnFullLine = True
Else
strRow = strRow & strLine
blnFullLine = False
End If
If blnFullLine = True Then
'code deleted for brevity that splits strRow and writes into field
values
strRow = ""
End If
Loop
--
Ken Snell
http://www.accessmvp.com/KDSnell/
"LMC" <(E-Mail Removed)> wrote in message
news:229E36E0-6B00-421B-B932-(E-Mail Removed)...
> Using the Line Input method I am reading a CSV text file that originated
> from
> a table with paragraph returns within single cells. The CSV format places
> the
> embedded paragraphs on seperate lines and I am trying to reconcatenate the
> embedded returns while importing the content into Access 2003. I get stuck
> with the nested loop and If-Then-Else logic when attempting to get the
> code
> to concatenate the last line between quotes.
>
> A simplified CSV example looks similar to this where rows 3 thru 5 would
> be
> concatenated into row 2 which would become "f" "g" "h" & "i" in the third
> field with paragraphs returns between each letter.
> 1, "a", "b", "c"
> 2, "d", "e", "f
> 3, g
> 4, h
> 5, i"
> 6, "x", "y", "z"
>
>
> Here's the code in it's current state...
> Dim strRow as String, intF as Integer, strLine as String
> 'code deleted for brevity that opens the text file and reads column
> names
> strRow = ""
> Do While EOF(intF) = False
> Line Input #intF, strLine
> If Not Right (strLine, 1) = char(34) Then
> strRow = strRow & strLine & Char(13)
> Loop
> Else
> strRow = strLine
> End If
> 'code deleted for brevity that splits strRow and writes into field
> values
> strRow = ""
> Loop
>
> I'd appreciate any help in modifying the code to perform my need.
> LMC