make numeric field add a zero before number

  • Thread starter Thread starter ianomami
  • Start date Start date
I

ianomami

hi,

how to make the field add a zero to the left of the number.
exemple: the user inputs the number 21 in the field and
it shows 021.

thanks,
ianomami.
 
The field needs to be a text-formatted field in order to do this. Set its
format to "000".
 
hi,

how to make the field add a zero to the left of the number.
exemple: the user inputs the number 21 in the field and
it shows 021.

A number IS A NUMBER. Numerically, 21 and 021 are simply two ways of
depicting the same number, and within the database they are stored in
*exactly the same way* - a series of binary bits, 0000000000001101.

If you want to *display* a number as three digits with leading zeros,
use a Format property of

000

If you want to *search* for a text label (which happens to consist of
numeric digits), especially if you want to make 21 and 021 two
distinct values, then use a Text field instead of any sort of number.
If you use an input mask of 000 it will allow the entry of only
numeric characters.
 
To add to what John said, 21 can be either a number or text. For
example I work for the Ohio Department of Taxation. We have 88 counties
numbered 1-88. To identify the counties we use the characters 01 - 88.
These are text and a formatted that way (almost all the time) We will never
need to add them together.

Each taxing district in a county (we have over 4,000 in Ohio) as an
additional 4 character field using 0-9 as characters, so again they look
like numbers but are text. In order to be able to use them together like
County 31 Taxing district 0111: 310111, they must be text or it gets real
complex.

Any number, like taxable values must be a number in order to be able to
compute things like tax and penalty.

One exception I use is with two identification numbers, a taxpayer
account number or charter number which are always composed of the characters
0-9 only. In the strict sense they are text since calculations will never
be done, but I use numbers so user can type 142 or 00000142 for the same
account. This reduces typing somewhat and really helps with the human
factor where many people will see 00000142 as just 142.

--
Joseph E. Meehan

26 + 6 = 1 It's Irish Math
 
Back
Top