Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Importing / Linking / August 2005

Tip: Looking for answers? Try searching our database.

Importing .csv file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Emma - 10 Aug 2005 00:58 GMT
Hi There,

I am getting an invalid argument when running this code.  I am trying to
import a .csv file into an access table.  

Private Sub TransferFile_CmdBtn_Click()

   DoCmd.OpenQuery "Flush_Usage_Query"
   
   usageFile = "C:\Documents and Settings\Administrator\My
Documents\NetManage\RUMBA\AS400\usage_query.csv"

   DoCmd.TransferText acImportDelim, , "Usage_Query", usageFile, , , True
   
 End Sub

Can someone help me?
Ken Snell [MVP] - 10 Aug 2005 01:07 GMT
What is the name of the table to which you are trying to import the data?
Your syntax is completely wrong...see Help file for details. The correct
syntax for this action is this (assuming that the csv file contains the
names of the fields):

DoCmd.TransferText acImportDelim, "SpecificationName", "TableName",
"PathAndFileName", True
Signature


       Ken Snell
<MS ACCESS MVP>

> Hi There,
>
[quoted text clipped - 13 lines]
>
> Can someone help me?
Emma - 10 Aug 2005 17:31 GMT
The access table name is "usage_query".  The .csv file does not contain any
field names and I'm okay with that.  I just need to get the data in access.  

> What is the name of the table to which you are trying to import the data?
> Your syntax is completely wrong...see Help file for details. The correct
[quoted text clipped - 20 lines]
> >
> > Can someone help me?
Ken Snell [MVP] - 10 Aug 2005 18:44 GMT
Then try this:

DoCmd.TransferText acImportDelim, , "usage_query", usageFile, False

Signature

       Ken Snell
<MS ACCESS MVP>

> The access table name is "usage_query".  The .csv file does not contain
> any
[quoted text clipped - 27 lines]
>> >
>> > Can someone help me?
Emma - 11 Aug 2005 01:37 GMT
That was it!  Thank you!!

> Then try this:
>
[quoted text clipped - 31 lines]
> >> >
> >> > Can someone help me?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.