Positivethinking
Programmer
Hello everyone
I am dealing with something apparently simple. Hopefully it is.I'm using ms access 2003
I am trying to import a csv file with the statement below:
DoCmd.TransferText acImportDelim, , "myacctable", _
Application.CurrentProject.Path & "\myfile.csv", 1
but i am getting a table myacctable_ImportErrors that contains
Error Field row
----- ----- ---
Type Conversion Failure an2 2
Type Conversion Falilure an4 15
Type Conversion Falilure an50 18
Here is the original table data
----------------------------------------------------
Myid an1 an2 an3 an4 an5......an50 comments
--------------------------------------------------
1 0.1 0.5 2.4 4.5 0.2 2.1 n/a
2 0.5 >1 0.3 5 1 3.2 n/a
..................
15 1.2 0.1 2.1 >4 5 2.3 n/a
18 2.1 1 3 2 4.1 <5 n/a
So most of the values are numbers but some of them are ">1, >4, <5" etc, I have set up the fields of the table to import the data as Text, so all should be text, but for some reason i am getting the error message on those values that are text and not numbers.
FYI, When i import the data manually, it works fine, when i do it using a routine then is a problem, but i need to automate because i have many tables to import and create outputs.
Thanks a lot for your help!!
I am dealing with something apparently simple. Hopefully it is.I'm using ms access 2003
I am trying to import a csv file with the statement below:
DoCmd.TransferText acImportDelim, , "myacctable", _
Application.CurrentProject.Path & "\myfile.csv", 1
but i am getting a table myacctable_ImportErrors that contains
Error Field row
----- ----- ---
Type Conversion Failure an2 2
Type Conversion Falilure an4 15
Type Conversion Falilure an50 18
Here is the original table data
----------------------------------------------------
Myid an1 an2 an3 an4 an5......an50 comments
--------------------------------------------------
1 0.1 0.5 2.4 4.5 0.2 2.1 n/a
2 0.5 >1 0.3 5 1 3.2 n/a
..................
15 1.2 0.1 2.1 >4 5 2.3 n/a
18 2.1 1 3 2 4.1 <5 n/a
So most of the values are numbers but some of them are ">1, >4, <5" etc, I have set up the fields of the table to import the data as Text, so all should be text, but for some reason i am getting the error message on those values that are text and not numbers.
FYI, When i import the data manually, it works fine, when i do it using a routine then is a problem, but i need to automate because i have many tables to import and create outputs.
Thanks a lot for your help!!