Solved

importing CSV into Access 2010

Posted on 2013-05-28
1
627 Views
Last Modified: 2013-06-01
Hi all,

I have a large .CSV file, with four columns ( three text data types and a date field).

One column, which is a text data type has contents with both alphanumeric ( FR347726, GB228765, 3987663, FR209878) and numeric data.

I created a button in an access form, that enables me to browse to file location and import the 'csv file' into a table.  The table data types are the same as cvs file ( date field and 2 text fields)

Problem is that all the alpha numeric data in the lost once the import into access table happens.

How can i prevent the alphanumeric data from being dropped, without tweaking the csv contents..Maybe some like of code? please help.

Thanks

lynmke
0
Comment
Question by:lynmke
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 26

Accepted Solution

by:
jerryb30 earned 500 total points
ID: 39203149
You would want to create an import specification, which would allow you to establish the field as a text data type. Start importing a sample file, without using your browse function, and when you selected the file, Choose Advanced, set up field type, and Save As. Give the file spec a name, and use that in your import code.

docmd.TransferText acImportDelim, 'specName', 'destinationTableName','Sourcefilename',  etc
0

Featured Post

Myth Busting: MongoDB Scalability (it scales!)

I was talking with one of my colleagues from our Technical Account Manager team about MongoDB’s scalability. He mentioned to me that several customers have been telling him that “MongoDB doesn’t scale!” MongoDB’s scalability was in question?

My response was, “Is that a joke?"

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question