A
Arain
MR Douglas helped me partially but please can someone perfect this code which
is working partially. my csv file had data that comes in to access using
delim"|" in the right format and i want all the fields when imported from csv
to be text. please can someone help me the code and the previous discussion
is below
Dim strFolder As String
Dim strFile As String
Dim strTable As String
strFolder = "C:\Some Folder\"
strFile = Dir(strFolder & "*.csv")
Do While Len(strFile) > 0
Strip the .csv from the end of the file name
strTable = UCase(Left$(strFile, Len(strFile) - 4)
DoCmd.TransferText acImportDelim,, strTable, _
strFolder & strFile, True
strFile = Dir()
Loop
Well the extension of the file ends with a csv and what you did with it just
imported the names of the files in the table but failed to import the data.
If i am doing it in access i can chose delim in the other field as "|" to get
the data in the right format in the table. my question is if its not comma
as delim can we chose
"|" ? also they are not in the same format and cant get that done.
is working partially. my csv file had data that comes in to access using
delim"|" in the right format and i want all the fields when imported from csv
to be text. please can someone help me the code and the previous discussion
is below
Dim strFolder As String
Dim strFile As String
Dim strTable As String
strFolder = "C:\Some Folder\"
strFile = Dir(strFolder & "*.csv")
Do While Len(strFile) > 0
Strip the .csv from the end of the file name
strTable = UCase(Left$(strFile, Len(strFile) - 4)
DoCmd.TransferText acImportDelim,, strTable, _
strFolder & strFile, True
strFile = Dir()
Loop
Well the extension of the file ends with a csv and what you did with it just
imported the names of the files in the table but failed to import the data.
If i am doing it in access i can chose delim in the other field as "|" to get
the data in the right format in the table. my question is if its not comma
as delim can we chose
"|" ? also they are not in the same format and cant get that done.