Export zero-filled fields into a text file

A

Angie

I am trying to export a fixed length file with some zero-
filled fields. It is dropping the leading zeroes. How
can I export & keep the leading zeroes?

Thanks.
 
J

John Nurick

Hi Angie,

Create a query that uses calculated fields like this to generate the
zero-padded fields. This

fXXX: Format([XXX], "000000")

pads the contents of field XXX to 6 characters wide.
 
A

Angie

Hi,
Thanks for the suggestion, but it didn't work. The
fields are zero padded in the table, but when I do the
export it is dropping the zeroes in my text file. I am
using an export specification.

Thanks,
Angie
-----Original Message-----
Hi Angie,

Create a query that uses calculated fields like this to generate the
zero-padded fields. This

fXXX: Format([XXX], "000000")

pads the contents of field XXX to 6 characters wide.

I am trying to export a fixed length file with some zero-
filled fields. It is dropping the leading zeroes. How
can I export & keep the leading zeroes?

Thanks.

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.
 
J

John Nurick

You have to create a query that uses the Format() function in calculated
fields like the example I gave. Then export the query. Using the Format
property of the fields in the table won't do the job.


Hi,
Thanks for the suggestion, but it didn't work. The
fields are zero padded in the table, but when I do the
export it is dropping the zeroes in my text file. I am
using an export specification.

Thanks,
Angie
-----Original Message-----
Hi Angie,

Create a query that uses calculated fields like this to generate the
zero-padded fields. This

fXXX: Format([XXX], "000000")

pads the contents of field XXX to 6 characters wide.

I am trying to export a fixed length file with some zero-
filled fields. It is dropping the leading zeroes. How
can I export & keep the leading zeroes?

Thanks.

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.
 

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