Limit text box to numeric entries

  • Thread starter Thread starter Joe M.
  • Start date Start date
J

Joe M.

I would like to limit a text box to numeric (0-9) entries. Also I would like
to limit the number of charactors entered. I think I can use the keypress
event but can't make my code work. Can someone supply some sample code?

Thanks,
Joe M.
 
I would like to limit a text box to numeric (0-9) entries. Also I
would like to limit the number of charactors entered. I think I
can use the keypress event but can't make my code work. Can
someone supply some sample code?

Thanks,
Joe M.

You don't need any code, just use an input mask
From the help file
0 Digit (0 to 9, entry required, plus [+] and minus [–] signs not
allowed).
9 Digit or space (entry not required, plus and minus signs not
allowed).
# Digit or space (entry not required; spaces are displayed as
blanks while in Edit mode, but blanks are removed when data is saved;
plus and minus signs allowed).
 
Back
Top