Macro to transfertext giving error msg

M

Matilda

Dear AllKnowingOnes,

I have created a spec and imported a text file into Access 2003 using the
Wiz, and would now like to have a macro perform the task.

Using the same filenames and locations as TransferText arguments in the
macro , I get the following error msg:
"You cannot import a text file unless it has one of these extensions: TXT,
CSV, TAB ...." etc

The source file does have a .csv extension - the Wiz had no problem with it.
What's happening??


MTIA's

Matilda
 
S

Steve Schapel

Matilda,

Can you please post back with full and precise details of the macro and
all arguments of the TransferText action? Thanks.
 
M

Matilda

Dear Steve,

Thanks for responding.

The error message appears whether or not I have SetWarnings on.

In the macro action TransferText, the arguments are:

Transfer Type: Import delimited
Specification Name: myText Import Specification
TableName: myTable
FileName: C:\Documents and Settings\.....\myText.csv
Has Field Names: No
HTML Table Name: ( blank)
Code Page: (blank)

I copied the filename path from the address bar in Explorer and cut and
paste it and the filename to avoid inadvertent typos.

The file exists in the specified location.

When I run the import specification with the same text file in the same
location, it finds the file and executes the import without problem.

I have done this (macro) in other access db's without problem.
I have comapcted and repaired the database.
Can't think what else I can possibly do!

Matilda
 
S

Steve Schapel

I am very sorry, Matilda, but I don't know what can be causing this problem.

It would be interesting to see whether you get the same thing happen if
you try another CSV file into another table, just for an experiment.
 
M

Matilda

Thanks, Steve - helps to know it's not just me!

Actually, I tried putting the exact same macro into a new database,
re-created the import spec, and bingo!
There is another error message (I just forget the exact wording) that pops
up in a query that has worked dozens of times before, and that can only be
disposed of by creating a new mdb, and importing everything into it.

So I guess that makes two! Will have to start keeping a list :-(((

Many thanks,


Matilda
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top