UtterAccess.com
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    
 
   
lizba
post Feb 10 2019, 09:32 AM
Post#1



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.
regards
Liz
Go to the top of the page
 
GroverParkGeorge
post Feb 10 2019, 10:15 AM
Post#2


UA Admin
Posts: 36,033
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: 11


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 do business.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 
lizba
post Feb 12 2019, 08:00 AM
Post#3



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
 
River59
post Feb 12 2019, 10:15 AM
Post#4



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:

CODE
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:

CODE
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
 
lizba
post Oct 3 2019, 11:02 AM
Post#5



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


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



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    14th November 2019 - 05:14 PM