Query to Create a Text File

S

Starwood

I would like to build a query that scans an Access table and, based on an
indicator within each database record, will extract other fields from that
record and write the information to a plain text (.txt) file. After the
indicator in the database record is detected, I would like to blank it out.

I need a general approach on how to do this or an example I could pull off
the Internet.

Thanks,

George
 
J

John Vinson

I would like to build a query that scans an Access table and, based on an
indicator within each database record, will extract other fields from that
record and write the information to a plain text (.txt) file. After the
indicator in the database record is detected, I would like to blank it out.

A Query, by itself, cannot create a text file. What you can do is
create a query using the "indicator" as a criterion to select the
desired records, and then use File... Export to export the query to a
text file. If this operation needs to be automated, you can write VBA
code using the TransferText method to do the same thing. See the
documentation in the VBA help file.

John W. Vinson[MVP]
 

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