Returning records with fewer than 10 digits

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

Guest

I need to add a criteria to my query that will look at the field (which
should have 10 digits in it) and return all records with fewer than 10 digits
in the field.

Anybody know a way?

Thanks!
 
In design view of your query pull down the field a second time an edit it
like this --
Number of Characters: Len([YourField])

Enter < 10 as criteria.
 
That worked awesome, thank you!

KARL DEWEY said:
In design view of your query pull down the field a second time an edit it
like this --
Number of Characters: Len([YourField])

Enter < 10 as criteria.

Paul said:
I need to add a criteria to my query that will look at the field (which
should have 10 digits in it) and return all records with fewer than 10 digits
in the field.

Anybody know a way?

Thanks!
 
An alternative to Karl Dewey's response.

If your field is a text field and could have other characters in it (other
than numeric characters) or could be null you might want to use

Field: SomeField
Criteria: NOT Like "##########" OR Is Null

The original method would not find
" 1234567" Since that is ten characters in length (3 spaces followed by 7
characters)
"123456789A" 10 characters, but not all numbers

Paul said:
That worked awesome, thank you!

KARL DEWEY said:
In design view of your query pull down the field a second time an edit it
like this --
Number of Characters: Len([YourField])

Enter < 10 as criteria.

Paul said:
I need to add a criteria to my query that will look at the field (which
should have 10 digits in it) and return all records with fewer than 10
digits
in the field.

Anybody know a way?

Thanks!
 
Back
Top