Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

importing CSV into Access 2010

Posted on 2013-05-28
1
Medium Priority
?
633 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 2000 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

715 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