Checking for non-numeric input

D

David Cleave

Hi all

A simple question. How do I write a validation rule that prevents
non-numeric input, i.e. stops the user entering anything other than a number?

Many thanks

David
 
N

Nikos Yannacopoulos

David,
Just put the following expression:

IsNumeric([cltName]) = True

In the Validation Rule property of the control, where ctlName is the
name of the control itself, combined with an appropriate message in the
Validation Text property.

HTH,
Nikos
 
S

Sprinks

David,

I assume you're talking about an unbound form control, or a control bound to
a Text or Memo-typed field. If its Control Source is defined as a Numeric
type field, type-checking is unnecessary. Access won't permit anything but a
numeric value.

Hope that helps.
Sprinks
 
Top