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?