Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export Secifications

Status
Not open for further replies.

acct98

IS-IT--Management
Aug 15, 2002
194
0
0
US
Does anyone know how to create the export specification [fixed width] for a text file? I would like to insert spaces between certain fields. In addition, I do not want quotation marks around the text fields. Any help would be greatly appreciated.
 
Hi!

Click on the table or query you want to export and choose File/Export. In the dialog box that follows you will need to select the file type as text files. The export wizard will come up and you will want to go to advanced. In the advanced dialog box you can select fixed width and choose the exact start and end points for each field. Another thing I like to do is base the output on a query and format the fields the way I want them, such as:

NewTextField: Format([MyTable]![MyTextField], " ")
NewTextField2: Format([MyTable]![MyNumeric], "0000000000")

These will add leading spaces or zeroes.

hth
Jeff Bridgham
bridgham@purdue.edu
 
Another way to do this is to create a report with the correct formatting, then use the DoCmd.OutPutTo method to create a text file. This is handy if you want to do this routinely (although you could also just output the query, as suggested by jebry).
 
I tried the suggestion from jebry on Sep 30, 2002

NewTextField: Format([mytable]![mytextfield]," ")
and also the leading zeros one

the leading zeros works fine, but I can't get it to put in the leading spaces...

here's what I used

newreason: Format([table1]![reason]," ")

Original Reason: abcde

I still get "abcde"
I want " abcde"

(without quotation marks of course)

can someone tell me what I'm doing wrong
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top