Hello there,
I have a macro to import multiple csv files to acess.
but when i do this with the code attached it doesnt work. the import process creates a lot of error tables which has errors like "Unparsable Record", "Field Truncated" and etc..
Code:
Function Importcsv()
Dim fs, fldr, fls, fl
Set fs = CreateObject("Scripting.FileSystemObject")
Set fldr = fs.getfolder("E:\Data As It Is\Conf\ImportGenius_murrali2\To Vishnu\")
Set fls = fldr.files
For Each fl In fls
If Right(fl.Name, 4) = ".csv" Then
DoCmd.TransferText acImportDelim, , "M1", "E:\Data As It Is\Conf\ImportGenius_murrali2\To Vishnu\" & fl.Name, True
End If
Next fl
End Function
But the same file when imported with the access file wizard which is opened by right clicking on the main area doesnt create any error table.
what might be the problem in my code.
Thanks in Advance.
--
Regards,
Vivek Palanissamy