Need Leading Zeros When Changing Field Data Formats

B

Brad

Help Appreciated,

I have a table field that is a number field containing 6 digits. I need to
change this field to a text field for a web page and retain the leading
zeros (where they exist). Is it possible?

Please Advise,

Brad
 
J

John Vinson

Help Appreciated,

I have a table field that is a number field containing 6 digits. I need to
change this field to a text field for a web page and retain the leading
zeros (where they exist). Is it possible?

I'd suggest creating a new six-byte Text field in your table; run an
Update query updating it to

Format([numberfield], "000000")

Check to make sure everything's working and then delete the number
field - if the value isn't being used for calculation, it probably
should be Text not Number.
 
B

Brad

John,

Excellent solution. Thank yo so much for your help.

Brad


John Vinson said:
Help Appreciated,

I have a table field that is a number field containing 6 digits. I need to
change this field to a text field for a web page and retain the leading
zeros (where they exist). Is it possible?

I'd suggest creating a new six-byte Text field in your table; run an
Update query updating it to

Format([numberfield], "000000")

Check to make sure everything's working and then delete the number
field - if the value isn't being used for calculation, it probably
should be Text not Number.
 

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