Print a report / query to a text file ??

  • Thread starter Thread starter Briank
  • Start date Start date
B

Briank

Hi All,

I need to export a report's (or a query) data to a text file which will then
be imported into another application.

Printing to RTF or Excel won't do it.

I also need to specify a very rigid format for the data in the text file.


Any clues?

T.I.A.
 
Briank said:
Hi All,

I need to export a report's (or a query) data to a text file which will then
be imported into another application.

Printing to RTF or Excel won't do it.

I also need to specify a very rigid format for the data in the text file.


Since a report is a grapical presentation of its data,
trying to put it in a text file is a losing proposition.

OTOH it's easy to export a query's data by using the
TransferText method (see VBA Help). If your formatting
requirements are beyond TransferText's capabilities, I think
you should use code to open a recordset based on the query
and use the standard I/O statements (Open, Print, etc) to
output the data.
 
Thanks Marshall.
Will do.


Marshall Barton said:
Since a report is a grapical presentation of its data,
trying to put it in a text file is a losing proposition.

OTOH it's easy to export a query's data by using the
TransferText method (see VBA Help). If your formatting
requirements are beyond TransferText's capabilities, I think
you should use code to open a recordset based on the query
and use the standard I/O statements (Open, Print, etc) to
output the data.
 
Back
Top