S
shep
I have a query that selects certain Zip codes by first 3 digits
SELECT qryContactNameV1.ContactName, Left(Contacts.Zip,3) AS FilterZip,
Contacts.Address1, Contacts.Address2, ([City]) & ", " & ([State]) & " " &
([Zip]) AS RemainAddress, Contacts.Company, Contacts.Title, Contacts.HomeTel,
Contacts.WorkTel, Contacts.CellPhone, Contacts.Email1, Contacts.Email2,
Contacts.Email3
FROM Contacts INNER JOIN qryContactNameV1 ON Contacts.ContactID =
qryContactNameV1.ContactID
WHERE (((Left([Contacts].[Zip],3))="770" Or (Left([Contacts].[Zip],3))="773"
Or (Left([Contacts].[Zip],3))="775" Or (Left([Contacts].[Zip],3))="777" Or
(Left([Contacts].[Zip],3))="778" Or (Left([Contacts].[Zip],3))="789"));
I need to exclude certain 5-digit codes associated with these 3-digit codes.
e.g., within 770, I may want exclude 77028
How can I do this?
Thanks
SELECT qryContactNameV1.ContactName, Left(Contacts.Zip,3) AS FilterZip,
Contacts.Address1, Contacts.Address2, ([City]) & ", " & ([State]) & " " &
([Zip]) AS RemainAddress, Contacts.Company, Contacts.Title, Contacts.HomeTel,
Contacts.WorkTel, Contacts.CellPhone, Contacts.Email1, Contacts.Email2,
Contacts.Email3
FROM Contacts INNER JOIN qryContactNameV1 ON Contacts.ContactID =
qryContactNameV1.ContactID
WHERE (((Left([Contacts].[Zip],3))="770" Or (Left([Contacts].[Zip],3))="773"
Or (Left([Contacts].[Zip],3))="775" Or (Left([Contacts].[Zip],3))="777" Or
(Left([Contacts].[Zip],3))="778" Or (Left([Contacts].[Zip],3))="789"));
I need to exclude certain 5-digit codes associated with these 3-digit codes.
e.g., within 770, I may want exclude 77028
How can I do this?
Thanks