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

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

Guest

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
 
If CStr(Val(TextField)) = TextField Then
' it's numbers only
Else
' it's mixed
End If
 
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.
 

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