Print Page | Close Window

OutputText.mdb (intermediate)

Printed From: Roger's Access Library
Category: Roger's Access Library
Forum Name: Roger's Download Samples
Forum Description: A compendium of Microsoft Access 97 and 2000+ routines, each separated into its own sample database.
URL: www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=303
Printed Date: 11 Dec 2019 at 1:45pm


Topic: OutputText.mdb (intermediate)
Posted By: Roger Carlson
Subject: OutputText.mdb (intermediate)
Date Posted: 29 Jul 2008 at 10:50pm

Please consider donating $1 per sample downloaded, http://www.rogersaccesslibrary.com/whydonations.htm - find out why here .
 

OutputText.mdb

This illustrates a simple way to precisely format data for text output. Assuming the following table:

ID  Field1  Field2         Field3         Field4
1   111     1/2/1999    4.2587        3.5%
2   222     1/3/1999    3.598745    5 %

where Field1 is an integer, Field2 is a Date, Field3 is a Single, and Field4 is a Single formatted as percent, and assuming you want the following output:

1,"000111",#Jan 02, 1999#,4.26,00350
2,"000222",#Jan 03, 1999#,33.60,00500

The code in Module1 will produce the called "Table2.txt" in your "My Documents" folder.

Download
Access 97 (23 KB):
http://www.rogersaccesslibrary.com/forum/uploads/5/OutputText97.zip - uploads/5/OutputText97.zip
Access 2000 (30 KB): http://www.rogersaccesslibrary.com/forum/uploads/5/OutputText2k.zip - uploads/5/OutputText2k.zip
 


-------------
Consider donating $1 per sample downloaded, http://www.rogersaccesslibrary.com/whydonations.htm" rel="nofollow - find out why here .<



Print Page | Close Window