Article View: comp.databases.ms-access
Article #50Re: Saving individual fields to text files
From: Larry Tubbs
Date: Tue, 05 Aug 1997 00:00
Date: Tue, 05 Aug 1997 00:00
38 lines
2062 bytes
2062 bytes
Hello, Do you want each record in your database in a separate file as well? If you have 50 fields, and 50 records, are we talking about 2500 files??? Or, do you want to have 50 files, file1 contains the contents of field1 for all 50 records, etc.. Either way, there is no built in Access function to do this type of export, but you can write a little VBA routine that will do this. Look in the online help for the Open statement. It will tell you how to create text files. Also look for the Print # and Write # statements that will allow you to write data to a file once you open it. After you know how to do that, it is a simple matter to create a recordset object off of your table, loop through it, writing each file as you go. The entire thing could be kicked off and run from a single button, macro or function call. I hope this helps, -- Larry Tubbs, MCPS, MCSD Silverleaf Vacation Club mailto:ltubbs@sprintmail.com http://www.geocities.com/ResearchTriangle/5727/ Advanced Development Group wrote in article <33e75cfe.8912449@news.mill.net>... >I have designed an Access v 2.0 database and want to save the >individual fields to text files. For example, my database has 50 >fields (Field1, Field2, Field3,... Field50) in it. I want to run a >single command that will take these fields and save them to seperate >text files (thus Field1 will be saved as field1.txt, Field2 will be >saved as field2.txt etc.)
Technical Details
Message-ID:
<5s7s0i$a2r@newsfep2.sprintmail.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<33e75cfe.8912449@news.mill.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1668c5,9662cfd40e34b43c X-Google-Attributes: gid1668c5,public X-Google-Thread: ff0ac,9662cfd40e34b43c X-Google-Attributes: gidff0ac,public From: "Larry Tubbs" <ltubbs@sprintmail.com> Subject: Re: Saving individual fields to text files Date: 1997/08/05 Message-ID: <5s7s0i$a2r@newsfep2.sprintmail.com> X-Deja-AN: 262527530 References: <33e75cfe.8912449@news.mill.net> X-MimeOle: Produced By Microsoft MimeOLE Engine V4.71.1008.3 Organization: Silverleaf Vacation Club Newsgroups: comp.databases.ms-access,at.fido.msaccess