If you run Visual Basic code containing the OutputTo method in a library database, Microsoft Office Access searches for the object with this name first in the library database, and then in the current database. An AcFormat constant that specifies the output format. If you omit this argument, Access prompts you for the output format. A string expression that's the full name, including the path, of the file that you want to output the object to.
If you leave this argument blank, Access prompts you for an output file name. Use True 1 to start the appropriate Microsoft Windows-based application immediately, with the file specified by the OutputFile argument loaded. Use False 0 if you don't want to start the application.
This argument is ignored for Microsoft Internet Information Server. If you leave this argument blank, the default False is assumed. The type of character encoding format that you want used to output the text or HTML data. If you leave this argument blank, Access outputs the data by using the Windows default encoding for text files and the default system encoding for HTML files.
Meaning that if you define FieldX to be 20 chars wide, 20 chars will be exported regardless of how many characters of data you have. Of course the width of a character depends on its font. You would probably want to use a fixed width font like Courier New when viewing the results.
Indeed TransferText assumes the data will be in a grid-like fashion, with each row of data being exported the same way. One possible alternative is to print the report to a text-only printer, which is configured to not print to LPT1 or some such, but to a file. Dev Center.
Explore Why Office? Android ASP. Ask a question. Quick access. Search related threads. Remove From My Forums. Answered by:. Archived Forums. Already a member? Close this window and log in. Join Us Close. Join Tek-Tips Forums! Join Us! By joining you are opting in to receive e-mail. Promoting, selling, recruiting, coursework and thesis posting is forbidden. Students Click Here. I can't figure out how to properly output a query to a file.
I need to export a query in ascii, comma delimited format. Can anyone help??? Here's the easiest way. Run the query 2.
0コメント