Write Query to Automatically Create Text File

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
 
J

John W. Vinson

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.
 
D

Dana F. Brewer

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 :)
 
J

John W. Vinson

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top