Setting a number as text to always be 6 digits long?

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hello.

I have a lot of 6 digit numbers in the table of my database.

If I want them to be possibly formatted as text, but to always show
the full 6 numbers, e.g. if I have 123456 it would be displayed as
exactly that, but if I have 7264 it would have to have two zeros in
front so it would be 007264, how do I do that, so it is always exactly
6 characters in length displayed?

I did try changing the format to text instead of number thinking it
would read it as text and display the leading zeros, but it doesn't
seem to.

Thanks for any help

John
 
How would your table know that you would want six "digits" to be
displayed...why not four, or twelve?

If you wish to store the numbers as text in the table, then you can insert
the leading zeroes when you store the "number" into the table; or you can
just display the "zeroes in front" when you show the number--- by using a
query with a calculated field that formats the "number" to have six
"digits".
 
Back
Top