Number to text with leading zero

R

Ralph

I am Appending a number field from one table to a text field and adding a
leading zero to another field in a different table.

Table A CaseID 940291 number field converted to
Table B CaseID 00940291 text field

Always must by 8 digits total legnth with zeros. The numbers typicallty are
5 or 6 or 7 digits long. I've inherited this and it would be preferrable not
to alter the first table structure as it is used elsewhere.

I am running Access 2007
 
F

fredg

I am Appending a number field from one table to a text field and adding a
leading zero to another field in a different table.

Table A CaseID 940291 number field converted to
Table B CaseID 00940291 text field

Always must by 8 digits total legnth with zeros. The numbers typicallty are
5 or 6 or 7 digits long. I've inherited this and it would be preferrable not
to alter the first table structure as it is used elsewhere.

I am running Access 2007

Format([NumberField],"00000000")

will convert Number datatype 940291 to Text datatype "00940291".
 

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