TransferText

Z

Zamdrist

Getting an error message trying to run the TransferText command of the
DoCmd object.

"...Jet Database Engine could not find database object
'export.txt'..."

DoCmd.TransferText acImportFixed, "cmdExport", "qryOperation", "\
\mediaagent\dmsimport\export.txt"

Well I don't quite understand why I am getting this error message
considering that export.txt is the destination output. I can use
TransferSpreadSheet command just fine without errors, sans the export
spec.

I verified the export spec does exist in the same database, the path
is valid and it doesn't appear to matter whether I use UNC or or a
mapped drive letter either.

Thoughts?

Thanks
 
Z

Zamdrist

You say you are trying to Export the file, but you are using acImportFixed??

A good point, lol...I actually copy and pasted that...I *am* exporting
and I *am* using acExportFixed.

DoCmd.TransferText acExportFixed, "cmdExport", "qryOperation", "\
\mediaagent\dmsimport\export.txt", vbNo

A mistake on my part and only muddies the water, sorry about that. I
am using the right argument in my code and get the error message
regardless.
 
D

Dirk Goldgar

Zamdrist said:
A good point, lol...I actually copy and pasted that...I *am* exporting
and I *am* using acExportFixed.

DoCmd.TransferText acExportFixed, "cmdExport", "qryOperation", "\
\mediaagent\dmsimport\export.txt", vbNo

A mistake on my part and only muddies the water, sorry about that. I
am using the right argument in my code and get the error message
regardless.

It's not obvious to me yet exactly what's wrong, but I can tell you that
you should not be using the defined constant vbNo in that statement;
you probably should be using False instead:

DoCmd.TransferText _
acExportFixed, _
"cmdExport", _
"qryOperation", _
"\\mediaagent\dmsimport\export.txt", _
False

So "cmdExport" is the name of an import/export specification that is
defined in this database? And the folder "\\mediaagent\dmsimport"
exists, on the computer where this code is running?

What is the exact error message?
 

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