how to output Access table to a text document?

M

Michelle

I have an Access file. When I open it up, and click on a Table, data
shows up in field columns, where some field columns may have 1 word in
it, some fields may have 2, 3 words in each field column, and so
forth. I would like to output this Access table to a text
document.

Is it possible to output an Access table to have a certain character,
let's say | as a field separator?

so if I were to view the text file after the output, it would look
something like this:


John | Doe | 123 Main Street | Bank of
America
Jane | Doe A. | 456 First Ave. West | Wamu
Tom | Smith | 50 South First St. | Citibank
 
F

fredg

I have an Access file. When I open it up, and click on a Table, data
shows up in field columns, where some field columns may have 1 word in
it, some fields may have 2, 3 words in each field column, and so
forth. I would like to output this Access table to a text
document.

Is it possible to output an Access table to have a certain character,
let's say | as a field separator?

so if I were to view the text file after the output, it would look
something like this:

John | Doe | 123 Main Street | Bank of
America
Jane | Doe A. | 456 First Ave. West | Wamu
Tom | Smith | 50 South First St. | Citibank

Select the table.
Click on File + Export
When the Export wizard opens, enter the name you wish for the new text
file. In the Save As Type drop-down select
Text Files (*.txt,*.csv,*,*.tab,*.asc)

Click OK.
The Export Specification wizard will then open.
Click on Advanced.
Enter the | as the Field Delimiter, None as the Text Qualifier, and
make any of the other changes to the default items you wish. Save and
name the change, i.e. "StandardExport".
Continue with the wiazrd. Click Finish.

The above has to be done just once.
The Access table will be exported as a | delimited text file. You can
now insert this file into a word document.

The next time you need to export a table, you can repeat the above.
When the Export wizard opens you can click on the Specs button and
select the specification named "StandardExport" so you won't have to
completely re-do the export.
or ..
If you wish to use code, you can use the TransferText method and
specify the "StandardExport" as the export specification argument.
Look this up in VBA help.
 

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