How to use OutputTo method

  • Thread starter Thread starter Peter Afonin
  • Start date Start date
P

Peter Afonin

Hello:

I'm using an OutputTo method to export a SQL server table to a text file.
However, if I use a format constant acFormatTXT, it doesn't allow me to
export in the format I need, i.e. tab separated. Is there a way I can export
a table programmatically and specify the details of the text file - comma
separated, tab separated and so on?

I would appreciate your help.

Thank you,
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Use the TransferText method instead. It allows you to specify an
import/export specification. You can set the specification to whatever
delimiter you want. See the Access VBA Help article "TransferText
Method."

Syntax:

expression.TransferText(TransferType, SpecificationName, TableName,
FileName, HasFieldNames, HTMLTableName, CodePage)

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQRp16YechKqOuFEgEQJh1gCg1bLOwc4dBwbVR7ulsqyXRWixKoIAn3dI
zxTsUtXj+oGwltBO+dbKpGeX
=uPp0
-----END PGP SIGNATURE-----
 
Thank you, I'll try.

Peter

MGFoster said:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Use the TransferText method instead. It allows you to specify an
import/export specification. You can set the specification to whatever
delimiter you want. See the Access VBA Help article "TransferText
Method."

Syntax:

expression.TransferText(TransferType, SpecificationName, TableName,
FileName, HasFieldNames, HTMLTableName, CodePage)

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQRp16YechKqOuFEgEQJh1gCg1bLOwc4dBwbVR7ulsqyXRWixKoIAn3dI
zxTsUtXj+oGwltBO+dbKpGeX
=uPp0
-----END PGP SIGNATURE-----
 
I still cannot export to the tab delimited text file. In order to do this, I
have to create a specification. But when I try to do this and go to Export -
Advanced, my Save As and Specs buttons are disabled. Any ideas why?

Thank you very much,

Peter
 
Back
Top