Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / November 2005

Tip: Looking for answers? Try searching our database.

Make Table Query to Exclude Particular Zip Code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
PCGrammy - 04 Nov 2005 17:16 GMT
Zip Code field uses 00000\-9999;0;_ as the input mask.  What code would I
need to type in the criteria field to return a table which excludes all
records within a five-digit +4-digit zip code?  By using the <> with a
five-digit zip code only, it works correctly; however, the make table query
still returns all records with the 5 + 4-digit zip code.
Any help would be appreciated.
Signature

PCGrammy

KARL DEWEY - 04 Nov 2005 18:17 GMT
You are probably typing the criteria entry like this --- 23456-0123  but you
need to omit the dash as it is not stored in the field.

> Zip Code field uses 00000\-9999;0;_ as the input mask.  What code would I
> need to type in the criteria field to return a table which excludes all
> records within a five-digit +4-digit zip code?  By using the <> with a
> five-digit zip code only, it works correctly; however, the make table query
> still returns all records with the 5 + 4-digit zip code.
> Any help would be appreciated.
[MVP] S.Clark - 04 Nov 2005 18:43 GMT
Select * from tablename where left$(zipcode,5) <> "12345"

Signature

Steve Clark, Access MVP
http://www.fmsinc.com/consulting

> Zip Code field uses 00000\-9999;0;_ as the input mask.  What code would I
> need to type in the criteria field to return a table which excludes all
[quoted text clipped - 3 lines]
> still returns all records with the 5 + 4-digit zip code.
> Any help would be appreciated.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.