Does a field have a number?

  • Thread starter Thread starter Sean G.
  • Start date Start date
S

Sean G.

Hello,

I would like to do an "If else" in code and see if a
field has a number in it. Is there anyway to do that?

Thanks,

Sean
 
Those won't work because isNumeric will return a false
either way. Here is my situation, i want to see if a
field has any number in it. So I want it to return false
if it is "xxx", and true if it is "xxx45". isNumeric
would return false either way. thanks.



-----Original Message-----
Try:
If IsNull(Me.[SomeField]) Then

If preferred, you could test for IsNumeric().

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.
I would like to do an "If else" in code and see if a
field has a number in it. Is there anyway to do that?


.
 
Ah: you want to know if the Text field contains any digits at all?

If [SomeField] Like "*[0-9]*" Then
 
Back
Top