A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

how to output Access table to a text document?



 
 
Thread Tools Display Modes
  #1  
Old July 4th, 2009, 02:09 AM posted to microsoft.public.access.queries
Michelle
external usenet poster
 
Posts: 4
Default how to output Access table to a text document?

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

  #2  
Old July 4th, 2009, 03:40 AM posted to microsoft.public.access.queries
MGFoster
external usenet poster
 
Posts: 653
Default how to output Access table to a text document?

Michelle wrote:
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


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

1. Right click on the table you want to export.
2. Select Export from the pop-up menu. The Export dialog appears.
3. Select Text File from the "Save As Type" field.
4. Navigate to the folder you want to save the file.
5. Click OK. The File Specification dialog appears.
6. Click the Advanced button.
7. Enter the | character in the "Field Delimiter" field.
8. Select {none} in the "Text Qualifier" field.
9. Click OK. (Or save the spec with a name).
10. Click the Finish button.

If you want to do this via VBA code read the TransferText Method in the
VBA help file (hint: Ctrl-G; type TransferText; keep the cursor on the
word & hit the F1 button).

HTH,
--
MGFoster:::mgf00 at earthlink decimal-point net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBSk7BFYechKqOuFEgEQJt2QCeP1Rs8I6vdOClwOc1JCOR5P JqXSoAnjQk
OcjvDL2QbX6Qtz4TSDijTyhu
=+H68
-----END PGP SIGNATURE-----
  #3  
Old July 4th, 2009, 04:15 AM posted to microsoft.public.access.queries
fredg
external usenet poster
 
Posts: 4,386
Default how to output Access table to a text document?

On Fri, 3 Jul 2009 18:09:29 -0700 (PDT), Michelle wrote:

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.

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:59 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.