leading zero

  • Thread starter Thread starter Martin
  • Start date Start date
M

Martin

Hello, I have 2 questions, the first consist of a text box
on a form. The problem I have is when I enter a number,
for example "0579" the leading zero disappears after I tab
over to another text box. Is there a way to have the zero
remain? My second question is how do I restrict users
from entering alpha characters in a text box. Is there a
way where a message box can pop up and inform them that
the text box only takes numeric characters?

Thank you in advance,
Martin
 
Hello, I have 2 questions, the first consist of a text box
on a form. The problem I have is when I enter a number,
for example "0579" the leading zero disappears after I tab
over to another text box. Is there a way to have the zero
remain?

Use a Text datatype in your table rather than a Number. If you'll be
doing calculations with it, then 0579 and 579 *ARE THE SAME NUMBER*;
if you won't be doing calculations, then don't use a Number field type
at all.
My second question is how do I restrict users
from entering alpha characters in a text box. Is there a
way where a message box can pop up and inform them that
the text box only takes numeric characters?

Set the field's Input Mask property to

0000

(four zeros); this will require that the user must enter exactly four
numeric characters, and will automatically pop up a message if they
type anything else.
 
Back
Top