D
Duncs
Although I've used access or a while, I've never had to do this, so
I'm a bit lost.
I have a master table, into which data must be inserted on a weekly
basis. I receive a .CSV from an external source and the data must be
parsed and place din the table.
So far, I've got the following for opening & reading the file:
Function read_data()
Dim fs, f
Dim strFileName As String
Dim strFileText As String
Dim dteFileDate As Date
Set fs = CreateObject("Scripting.FileSystemObject")
strFileName = ""
Do While Not fs.FileExists(strFileName)
strFileName = InputBox("Please enter file path / name",
"FileName")
Loop
Set f = fs.opentextfile(strFileName, 1, 0)
strFileText = f.readline
While InStr(1, strFileText, "D", vbTextCompare) <> 2
strFileText = f.readline
Wend
End Function
But, what I don't know is how to split the data and insert it into the
table. All the data is separated by ',' and all fields are qualified
with the "" characters.
Your assistance is very much appreciated
TIA
Duncs
I'm a bit lost.
I have a master table, into which data must be inserted on a weekly
basis. I receive a .CSV from an external source and the data must be
parsed and place din the table.
So far, I've got the following for opening & reading the file:
Function read_data()
Dim fs, f
Dim strFileName As String
Dim strFileText As String
Dim dteFileDate As Date
Set fs = CreateObject("Scripting.FileSystemObject")
strFileName = ""
Do While Not fs.FileExists(strFileName)
strFileName = InputBox("Please enter file path / name",
"FileName")
Loop
Set f = fs.opentextfile(strFileName, 1, 0)
strFileText = f.readline
While InStr(1, strFileText, "D", vbTextCompare) <> 2
strFileText = f.readline
Wend
End Function
But, what I don't know is how to split the data and insert it into the
table. All the data is separated by ',' and all fields are qualified
with the "" characters.
Your assistance is very much appreciated
TIA
Duncs