I am looking for a function that would test a field value for numeric or text

D

Dave

Is there a function that would test a value to see if it is numeric or text?

These values are in a text field.

Examples:

123456 = Numeric

DMSmith = Text

or somehing like this

Thanks

dave
 
J

John Spencer

IsNumeric([SomeField]) will return True if the entire contents of the field
can be treated as a number.

There is a little bit of a glitch in this. If the entry could be treated as
a scientific notation number then that will recieve True.

IsNumeric should return true for
Strings with only numbers
Strings with a plus or a minus sign at the beginning or end of a string of
numbers
Strings with one "e" or one "d" inside a string of numbers (scientific
notation)
All the above with leading or trailing spaces
Also any number of spaces between the plus or minus sign and a string of
numbers
 
D

Dave

Thanks it gives me a place to start

Dave


John Spencer said:
IsNumeric([SomeField]) will return True if the entire contents of the
field can be treated as a number.

There is a little bit of a glitch in this. If the entry could be treated
as a scientific notation number then that will recieve True.

IsNumeric should return true for
Strings with only numbers
Strings with a plus or a minus sign at the beginning or end of a string of
numbers
Strings with one "e" or one "d" inside a string of numbers (scientific
notation)
All the above with leading or trailing spaces
Also any number of spaces between the plus or minus sign and a string of
numbers


Dave said:
Is there a function that would test a value to see if it is numeric or
text?

These values are in a text field.

Examples:

123456 = Numeric

DMSmith = Text

or somehing like this

Thanks

dave
 

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

Top