check text box for letter or number

  • Thread starter Thread starter mike
  • Start date Start date
M

mike

Hi all,

How do i check to see if the user enter alphabets or
numbers in a text box?

Thanks for the help.

mike
 
To check the entirety of the entry in the text box, insert the following
code in the After Update event of the text box:

If IsNumeric(Me!MyTextBox) then
' do something
else
' do something else
End If

If you need to evaluate on a character-by-character basis, review the
KeyPress Event in VBA Help.
 
cool, thanks
-----Original Message-----
To check the entirety of the entry in the text box, insert the following
code in the After Update event of the text box:

If IsNumeric(Me!MyTextBox) then
' do something
else
' do something else
End If

If you need to evaluate on a character-by-character basis, review the
KeyPress Event in VBA Help.

--
Cheryl Fischer
Law/Sys Associates
Houston, TX




.
 
Back
Top