Display Leading Zeros in Access

  • Thread starter Thread starter Rich
  • Start date Start date
R

Rich

I enter check numbers in a number field. They are of varying length.
Some have a leading zero or zeros.

How can I get them to display? I prefer it to remain a number field.
If it is a text field I cannot sort properly.

Thanks for any help.
 
Search this forum for
Subject: Re: Adding back Leading Zeros
and read the answer by Ken Snell
 
Rich said:
I enter check numbers in a number field. They are of varying length.
Some have a leading zero or zeros.

How can I get them to display? I prefer it to remain a number field.
If it is a text field I cannot sort properly.

Thanks for any help.

Actually if you enter leading zeros in a text field then the sorting will be
the same as if it were a number field.
It is only when you don't have leading zeros that the sort is different.

Anyway, just set your format property to the number of total digits you
want. The example below would show leading zeros out to six places.

"000000"
 
Back
Top