Roger's Access Library Homepage
Forum Home Forum Home > Roger's Access Library > Roger's Download Samples
  New Posts New Posts RSS Feed - OutputText.mdb (intermediate)
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

>
Want a good read? Try The Summer of His Life (available on Amazon!)

OutputText.mdb (intermediate)

 Post Reply Post Reply
Author
Message
Roger Carlson View Drop Down
Microsoft MVP
Microsoft MVP


Joined: 20 Feb 2008
Status: Offline
Points: 261
Post Options Post Options   Thanks (0) Thanks(0)   Quote Roger Carlson Quote  Post ReplyReply Direct Link To This Post Topic: OutputText.mdb (intermediate)
    Posted: 29 Jul 2008 at 10:50pm

Please consider donating $1 per sample downloaded, 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):
uploads/5/OutputText97.zip
Access 2000 (30 KB): uploads/5/OutputText2k.zip
 
Consider donating $1 per sample downloaded, find out why here.<
Back to Top
Sponsored Links
>
Want a good read? Try The Summer of His Life (available on Amazon!)

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.