Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

table errors when using TransferText to import a csv 1

Status
Not open for further replies.

Positivethinking

Programmer
Dec 17, 2008
9
US
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!!
 
Use a SpecificationName

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks a lot PHV

it works great


Can you tell, where does this files is saved, i was not able to find it in any folder. I am thinking it is internally saved, but what if someone needs to use the form/program remotely, will that person have any problems if the file is not local?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top