Returning records with fewer than 10 digits

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!
 
G

Guest

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.
 
G

Guest

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!
 
J

John Spencer

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!
 

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