field formating...

J

JayL

All -
I have a field in a table that is numeric. It should be 11 characters but
the table is omitting the leading zero's.
Ex: 00092557589 is showing as 92557589. The problem is I need the leading
zero's.
Any ideas?
 
R

Rick Brandt

JayL said:
All -
I have a field in a table that is numeric. It should be 11 characters
but the table is omitting the leading zero's.
Ex: 00092557589 is showing as 92557589. The problem is I need the
leading zero's.
Any ideas?

If you just need to *See* leading zeros and all of the results will have the
same length then you can just apply the appropriate format property on forms
and reports.

EX: a format property of...

"00000000000"

....will display the number 92557589 as 00092557589.

If you need the results to be different lengths...

00092557589
0096447598

....or you need values like 00123, 0123, and 123 to be treated as
non-duplicates then you cannot use a number field. You'll need to use a
Text field instead.
 
J

John Vinson

All -
I have a field in a table that is numeric. It should be 11 characters but
the table is omitting the leading zero's.
Ex: 00092557589 is showing as 92557589. The problem is I need the leading
zero's.
Any ideas?

If this is an identifier field (like a serial number or part number)
and will not be used for calculations, I'd just use a Text datatype.
Long Integer numbers are limited to two billion odd - ten digits - in
any case; and as numbers, the two you posted are exactly the same
number.

Set the text field's Input Mask to "00000000000" to enforce entry of
eleven digits.

John W. Vinson[MVP]
 

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