exporting to fixed width text file, need to keep leading zeros

Joined
May 30, 2007
Messages
1
Reaction score
0
I have an issue exporting to a text file. I created a form so the end users can enter data, they would then export that data to a fixed width text file (with predefined specs) Of course the leading zeros disappears on a numeric field called "Beer Gallons". This file will then be copied to an AS/400 data file, which cannot read the file without the leading zereos. I have read numerous solutions that deal with using the Format() function in query, but I'm still confused on what/where this actually goes...(sorry, still an access novice). I've used Format, "0000000". in the criteria, if I run the query the zeros appear, but when I export it the zeros disappear...appreciate some feedback here!!!
6/1/07..2:00 CST..Okay...I figured out where & what..using the expression builder, I was able to use the format() function. It displays the field perfectly (0005418) but when I export the query into a fixed width, I have to manually move the right field break 2 positions to the right. (it comes in as 5 instead of 7). It then looks okay in the text file...BUT..If I choose to use my predefined spec & click next it displays perfectly, but when I click finish & look at my text file the zeros are gone. I would really prefer to use the predefined specs.
WHY WON'T THE ZEROS STAY??????????


Thanks,
DeWayne
 
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top