I added comments to what I think is going and wanted to get your response for those as well as the lines not commented. Once again, thanks.
Dim i As Integer
Do Until EOF(1)
xchar = Input(1, #1) 'Get one character
If xchar = vbLf Then 'Linefeed start at next line
reccount = reccount + 1 'not sure
fieldcount = 1 'not sure
reclength = 0 'not sure
'MsgBox reccount
'GoTo skip
If reccount > 1 Then
With rst
.AddNew
For i = 1 To 200
.Fields(i) = fieldstring(i) 'not sure
fieldstring(i) = "" 'double quotes are around some of the records
Next i
.Update
End With
With rst2
.AddNew
.Fields(63) = keyfield 'set primary key in tblImport2
For i = 1 To maxfields - 200 'write records to remaining fields storedd in tbl2
.Fields(i) = fieldstring(i + 200)
fieldstring(i + 200) = ""
Next i
.Update
End With
End If
'skip:
Else
If reccount > 0 Then
x = x + 1
If xchar = Chr(34) Then 'hand "" records
If first = 0 Then
first = 1 'not sure
Else
first = 0
End If
'MsgBox x
End If
'MsgBox x & " " & fieldcount & " - " & "first - " & first
If first = 1 Then
fieldstring(fieldcount) = fieldstring(fieldcount) & xchar
Else
If xchar <> "," Then fieldstring(fieldcount) = fieldstring(fieldcount) & xchar
If xchar = "," And first = 0 Then
fieldcount = fieldcount + 1
If fieldcount = 25 Then keyfield = fieldstring(24)
End If
End If
End If
maxfields = fieldcount
End If