Archive Acess Report Data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report of customer summary: Name, ID, and Reason, Time, and Commnet
fields. I want to achive these data in comma separated archived file. How can
I do that?

Thank you.
 
I have a report of customer summary: Name, ID, and Reason, Time, and Commnet
fields. I want to achive these data in comma separated archived file. How can
I do that?

Thank you.

Create a Query selecting those fields and records which you wish to
archive, and use File... Export to export it. Or, write VBA code using
the TransferText method to to the same thing.

John W. Vinson[MVP]
 
Hi, Jay.
I want to achive these data in comma separated archived file. How can
I do that?

If you need the data to be "unformatted," with just commas between each
field's value, as opposed to the grouping of columns and rows displayed by
the report, then you can use the Export Text Wizard, the TransferText( )
method in a VBA procedure, or a query that saves the data to file. First,
determine what the record source of the report is.

Next, decide which method to use. If you use the Export Text Wizard, then
open the query or table first, select the File -> Export... menu to open the
Export Text Wizard. Select the directory, file name, and file type to save
the file to. Follow the Wizard's prompts to save the file.

If you decide to use the TransferText( ) method in a VBA procedure, the
syntax is as follows:

DoCmd.TransferText acExportDelim, "SpecName", "QueryName",
"C:\Data\MyData.txt", True

Check the online help file for the variations available.

If you decide to use a query, then create a new query and paste the
following SQL statement into the SQL View pane:

SELECT * INTO [Text;HDR=YES;DATABASE=C:\Data].MyData.txt
FROM qryName;

Replace qryName with the name of your table or query. Replace C:\Data with
the path to the exported file, and replace MyData.txt with the name of your
exported file. Save the query and run it.

If you need the data to be formatted the same way as the report, then you
can open the report in Preview View and select the File -> Export... menu to
open the Export dialog window. Browse to the directory and choose a name and
file format to save the file to, then select the "Export" button to save the
file.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers. Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.
 
Back
Top