make numeric field add a zero before number

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.
 
K

Ken Snell

The field needs to be a text-formatted field in order to do this. Set its
format to "000".
 
J

John Vinson

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.
 

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