943,982 Members | Top Members by Rank

Ad:
Sep 30th, 2009
0

Help with csv import to Access table

Expand Post »
Hello,

I have an access table where I have to import a csv file.
I have a very simple code in the Click _ Event Sub.
However it seems the code is ok, file gets imported but I get a separate table with errors in import.
In that table two fields are specified as error fileds.
The fields data type is numeric and I have set the filed definition in the table as number for both. I tried saving the problem fileds in the csv file as text and then in design view changed the fileds type to text. That did not work too.
What can I do to prevent a second "error" table to be created and the csv file to get imported in the access table ok ?

Here is my code:

Option Compare Database

Private Sub Command0_Click()
 DoCmd.TransferText acImportDelim, "File Import Specification", "File", "C:\File.csv", 0
End Sub

Thanks in advance
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
mem81 is offline Offline
29 posts
since Feb 2009
Sep 30th, 2009
0

Re: Help with csv import to Access table

What is the field size for the number fields in the table?
Reputation Points: 35
Solved Threads: 21
Junior Poster
HI2Japan is offline Offline
195 posts
since Mar 2006
Oct 10th, 2009
0
Re: Help with csv import to Access table
So you actually created an import specification which is called "File Import Specification?"

Perhaps if you haven't figured it out yet and want to send me your database file and your csv file, I can see what is up.

I can PM you my email address if you wish. Let me know.
Reputation Points: 31
Solved Threads: 8
Junior Poster in Training
boblarson is offline Offline
77 posts
since Jan 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MS Access and FileMaker Pro Forum Timeline: Display fields in calendar like form
Next Thread in MS Access and FileMaker Pro Forum Timeline: MS Access 2003 & 2007





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC