leading zeros

  • Thread starter Thread starter Alan Swan
  • Start date Start date
A

Alan Swan

Hi,

How can I keep leading zeros in a text field? Currently, it just disappear
after you enter, say, 0010, then hit Enter key.

Thanks.
 
Alan Swan said:
Hi,

How can I keep leading zeros in a text field? Currently, it just disappear
after you enter, say, 0010, then hit Enter key.

Thanks.

Try changing the data type in the table to Text.
 
If the leading zeros are disappearing, then I suspect you have a numeric
field, not a text field. Text fields do not drop leading zeros.
 
Alan -

I got this answer from Rick Brandt some time ago. It worked for me:

*****

Either use a Text DataType instead of Number or set the Format property on
your
forms and reports to "00000" (using the number of zeros appropriate to your
purpose).

If you want to simultaneously see records like 0123 and 45 then you have to
use
a Text DataType. A Format property will want to force the same length for
all
records padding as many zeros as it takes to achieve that.

*****
 
Back
Top