how do I find out if data in a text field is a number or text str

J

jahfish

I want find out if data in a text field is a number or text string. e.g if
the data is 1234, rather than fred1234
 
D

Douglas J. Steele

If CStr(Val(TextField)) = TextField Then
' it's numbers only
Else
' it's mixed
End If
 
A

Allen Browne

Test it with IsNumeric().

For example, you might type this into a fresh column in the Field row in
query design:
Field1IsNumber: IsNumeric([Text0])
replacing Text0 with the name of your field.

IsNumeric() is a little quirky, but it should do what you need.
 
Top