X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
   Reply to this topicStart new topic
> Using Transfertext To Export To Csv, Access 2016    
post Feb 10 2019, 09:32 AM

Posts: 263
Joined: 9-February 06
From: South Africa

Hi there
I am trying to export a query to csv format. I have tried:

DoCmd.TransferText acExportDelim, "Standard Output", "XeroCFINV", strFile, False

But get the following error.

The text specification "Standard Output" does not exist

Any ideas?

Thanks in advance.
Go to the top of the page
post Feb 10 2019, 10:15 AM

UA Admin
Posts: 36,199
Joined: 20-June 02
From: Newcastle, WA

Intellisense can be VERY helpful in figuring out issues like this:

Attached File  intellisense.jpg ( 47.41K )Number of downloads: 12

It is also handy to include all of the arguments so that you can more easily see what each one is supposed to be doing for you.

In this case, you are asking for an Import/Export Specification called, I guess, "Standard Output".

Does it exist yet? Try recreating it if it does. Try naming it without a space in the name while you're at it. "StandardOutput"

My Real Name Is George. Grover Park Consulting is where I did business for 20 years.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
post Feb 12 2019, 08:00 AM

Posts: 263
Joined: 9-February 06
From: South Africa

Hi GroverParkGeorge

The code I used was copied from Microsoft developer network - I assumed "standard output" was a standard inbuilt specification.

I have no clue how to create a specification. Can you point me in the right direction?

Many thanks

Go to the top of the page
post Feb 12 2019, 10:15 AM

Posts: 1,734
Joined: 7-April 10
From: Detroit, MI

Liz, you do not need an export specification for this. To export to csv, this is what I use:

DoCmd.TransferText acExportDelim, , "Temp_Export", strFileSaveName & ".csv", True

The second comma after acExportDelim, skips the saved specification. "Temp_Export" is the name of the table I am exporting, strFileSaveName is the name of the file to be saved.

You would have:

DoCmd.TransferText acExportDelim, , "XeroCFINV", strFile & ".csv", False

Remember ... Armstrong, Aldrin and Collins flew to the moon and back with a computer system less complex than a modern, programmable toaster ...
Go to the top of the page
post Oct 3 2019, 11:02 AM

Posts: 263
Joined: 9-February 06
From: South Africa

Thanks so much for this. I will try it out
Go to the top of the page
post Oct 3 2019, 11:45 AM

Posts: 1,510
Joined: 2-April 09
From: somewhere out there...

you create import/export specification when you create the import/export
manually (through ribbon menu).
after the import/export, it will ask if you want to save the import/export spec.

Never stop learning, because life never stops teaching.
Go to the top of the page

Custom Search

RSSSearch   Top   Lo-Fi    12th December 2019 - 11:50 PM