acExportDelim problems

S

Steve

I am using the command below to create a .txt file frm a
query.

DoCmd.TransferText
acExportDelim, "qryInvoicesTXTSpec", "qryInvoicesTXT", "Ste
ve", False


I have successfully exported the query manually, that was
when I created the spec file, but when I try it from a
form using the command above I get error 3027, Cannot
update. Database or object is read only.

Can anyone offer any help on this?
 
J

Joe Fallon

Q245407

The file that you are importing does not have a recognized file name
extension

Security patches to Access 97 and Access 2000 restrict the kinds of
files you can import. That restriction is based solely on the file
extension. By default, Jet will let you import files having the
extensions "txt", "csv", "tab", "asc", "htm", and "html".

Rename the file name extension so that it matches one of extensions listed
in the registry.
-or-
Modify the following registry key to include the extension of the file that
you are importing.

See the settings in:
HKEY_LOCAL_MACHINE\Software\Microsoft\Jet\4.0\Engines\Xbase
Extensions = "dbf" might be changed to "dbf,xyz"

HKEY_LOCAL_MACHINE\Software\Microsoft\Jet\4.0\Engines\Text\DisabledExtension
s
add the entry:
"DisabledExtensions"="exe"
and the Import wizard/TransferText will work on a file with any extension.
 
S

Steve

Joe,

I am not having problems importing a file. I have imported
a .txt file to a table, updated the table and want to
export it to another text file. It is the export that
fails. When I first trid it it worked, then I modified the
form that has the 'on click' property of a button set to
perform the export and I started to get the error. I went
back to the original version of the form and re-entered
the changes but still get the error.

Thanks,

Steve
 
G

Guest

Steve-O,

Your problem is in where your trying to put your file...

This is some code I have...

DoCmd.TransferText acExportDelim, "QryCreate_Export
Export Specification", "qryCreateExportWEB", "C:\PC
Charge\Import\qryCreate_ExportWEB.txt"

You see that I have my Spec, then the Query that I am
using to make the export - Now the last part is where the
file is suppose to go. You may want to use.
acExportDelim, "qryInvoicesTXTSpec", "qryInvoicesTXT", "C:\
Steve.txt"

And if you are seprating it with commas and want it as a
CSV use.

Name "C:\Steve.txt" As "C:\Steve.csv"

-Steve
 

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