error when importing .csv

llaman

New Member
Joined
Jul 14, 2004
Messages
37
"the text file specification "0" does not exist. You cannot import, export, or link using the specification"

I am not sure what is causing this error, but here is the relevant code

DoCmd.TransferText acImportDelim,acSpreadsheetTypeExcel4, arg1, "H:\Time_Tracking\MasterReport\" & arg1 & ".csv"'



Also, why is this statement not allowed: (i must comment it out to run)

DoCmd.RunSQL (INSERT INTO arc_entries_ENG (userid, entrydate ...)
SELECT userid, entrydate,.... FROM entries_ENG)
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
The number/type of arguments you are using is wrong.

From Access Help:

DoCmd.TransferText [transfertype][, specificationname], tablename, filename[, hasfieldnames][, HTMLtablename][, codepage]

You appear to have transfertype twice -

ImportDelim, acSpreadsheetTypeExcel4
 
Upvote 0
I took the "acSpreadsheet......" out and it now gives me the error that the method requires a filename argument. Perhaps it was not the problem?
 
Upvote 0

Forum statistics

Threads
1,221,821
Messages
6,162,157
Members
451,750
Latest member
pnkundalia

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top