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




.
 

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

Back
Top