how to exclude certain parameters?

  • Thread starter Thread starter _Adrian
  • Start date Start date
A

_Adrian

I need help building the following query..

I'm searching a ZIP code field.. and I need to show any records LIKE
"*[!0-9]*" but unfortunately, this will allow any zip codes + 4 with the
hyphen (eg. 98101-2456) because the hyphen is not 0-9... I don't want to
include these records in the query results! How do I qualify the 0-9 but
also exclude the hyphened records?
 
Add the following expression to a blank field in your query:
OnlyFiveDigitZip:Len([Zip])
and put htis in the criteria:
5
 
I need help building the following query..

I'm searching a ZIP code field.. and I need to show any records LIKE
"*[!0-9]*" but unfortunately, this will allow any zip codes + 4 with the
hyphen (eg. 98101-2456) because the hyphen is not 0-9... I don't want to
include these records in the query results! How do I qualify the 0-9 but
also exclude the hyphened records?

To find invalid zips, or Canadian or other post codes?

How about

LIKE "*[!0-9]* AND NOT LIKE "#####-####"


John W. Vinson[MVP]
 
Back
Top