I want to insert values from a csv file in to a table.
Im having trouble in recognising an EOL character
When i try and insert buffer(2) which is the last field i insert, it also has the date from the next line so the program isnt recognising when the 1st line is finished and the 2nd line has started
From the code i am also going through the code charachter by charater is there an easy way to go through line by line.
Open MyPathFile For Input As #1
Do While Not EOF(1)
Do While MyChar <> vbLf
MyChar = Input(1, #1)
DataIn = DataIn + MyChar
buffer = Split(DataIn, ",")
DoCmd.RunSQL "INSERT INTO tlbTrans (DateOfTrans, PayeeName, Amount) " + _
"VALUES ('" & buffer(0) & "','" & buffer(1) & "'," & buffer(2) & ")"