Write Query to Automatically Create Text File

  • Thread starter Thread starter Dana F. Brewer
  • Start date Start date
D

Dana F. Brewer

What is the syntax for creating a text file? I know how to do this manually
using the menus but I'd like to put the language in a query (not a macro or
procedure) if at all possible.

If it cannot be done in a query, how do I do it and what is the procedure?

Thanks!

Dana Brewer
 
What is the syntax for creating a text file? I know how to do this manually
using the menus but I'd like to put the language in a query (not a macro or
procedure) if at all possible.

If it cannot be done in a query, how do I do it and what is the procedure?

Thanks!

Dana Brewer

It can't be done directly in a query. You must either use File... Export to
manually export the query, or break down and use the TransferText action in a
Macro or the TransferText method in a VBA procedure. Type Ctrl-G to open the
VBA editor (to get at the VBA help file) and look at the help topic for
TransferText.
 
Ok, I will do that. But can I call the macro from the query? What is the
basic syntax for that please?

Thanks for your quick response.

Dana :)
 
Ok, I will do that. But can I call the macro from the query? What is the
basic syntax for that please?

No.

A Query is NOT EXECUTABLE.
It's not a program.
It's not sequential.

You can execute a query from code or from a macro, but you cannot execute a
macro from a query.
 
Back
Top