Keep Leading SSN Zero When Exporting To Text File

R

Ronster

I have a table that with the SSN as the first field. It is formatted
so it is always 9 digits, no hyphens. It is formated as text with an
input mask of 000000000;;#. Everything looks good until I export the
table to a text file. It drops all the leading zeros. The client this
text file is going to has requested a 9 digit field. Is there any way
to keep the field formated as 9 digits when exporting to a text file?
 
J

John Vinson

I have a table that with the SSN as the first field. It is formatted
so it is always 9 digits, no hyphens. It is formated as text with an
input mask of 000000000;;#. Everything looks good until I export the
table to a text file. It drops all the leading zeros. The client this
text file is going to has requested a 9 digit field. Is there any way
to keep the field formated as 9 digits when exporting to a text file?

Is the datatype (not the format!!) of the field Number (wrong) or Text
(correct)? If it's a Text field it should export "as is", as text with
leading zeroes. Is that not the case?

John W. Vinson[MVP]
 
R

Ronster

John said:
Is the datatype (not the format!!) of the field Number (wrong) or Text
(correct)? If it's a Text field it should export "as is", as text with
leading zeroes. Is that not the case?

John W. Vinson[MVP]

Thanks John. The data type is text but the spec I'm using changes the
field names. If I don't use the spec it formats correctly as text
(quote marks). If I export to Excel it also formats correctly but if I
export to text and use the spec file it formats as a number. Does the
spec file have it's own data type for each renamed field? How do I
edit that file?
 
R

Ronster

I found the problem. I created the original spec when the SSN field
was fomated as a number. I deleted the original spec and created a new
one. Now if formats correctly when exporting to a text file.
 

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