Validation Text Problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Dear All,

I am using a validation rule ^[0-9]*$ in my TextBox on Access form which
allows only Numbers to be entered in the TextBox. How ever it doesnt seem to
be working.And I am geting "Please enter Numbers only" validation text every
time I enter anything in the textbox.

Any idea whats going on.

cheers,
Sam Solomon
 
It may be simpler to use the TextBox_BeforeUpdate Event and check whether
the entry is numeric or not using the IsNumeric() function.
 
IsNumeric is generally accurate, but there are exceptions to the rule of
only numbers.

IsNumeric("1d10") is True
IsNumeric("1e10") is True
IsNumeric("-10") is True

I usually use a custom function to check each character in the string using
IsNumeric.

Van T. Dinh said:
It may be simpler to use the TextBox_BeforeUpdate Event and check whether
the entry is numeric or not using the IsNumeric() function.

--
HTH
Van T. Dinh
MVP (Access)



Sam Solomon said:
Dear All,

I am using a validation rule ^[0-9]*$ in my TextBox on Access form which
allows only Numbers to be entered in the TextBox. How ever it doesnt seem
to
be working.And I am geting "Please enter Numbers only" validation text
every
time I enter anything in the textbox.

Any idea whats going on.

cheers,
Sam Solomon
 

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