By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,705 Members | 1,815 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,705 IT Pros & Developers. It's quick & easy.

How to query for multiple criteria?

P: n/a
Access 97 - need to extract from large database a dynaset of "contacts"
based on zip codes. If I have 1000+ names and need to extract 100+ zip
codes from them, what is easiest way to query this? I have tried to use the
"IN" operator....like so..
In(19708,19709,19711,21201.......21907), but apparently I am inputting more
than the 1024 characters allowed in the query wizard. I switched to SQL
view and inserted the wanted zip codes that way and it worked at first, but
then I did something wrong and since then am tsol...(lost backwards!). Does
any one have an idea on way to find some zip codes in a table of many?
Thanks, Willy
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Could you create a table containing a record for each zip code you want, and
INNER JOIN that to your contacts?

Alternativley, if you already have a table of zip codes, you could add a
yes/no field and check the box for the ones you want. Then create a query
joining the 2 tables, with True in the Criteria row under the yes/no field.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"William Smith" <wi***@oya.com> wrote in message
news:10*************@corp.supernews.com...
Access 97 - need to extract from large database a dynaset of "contacts"
based on zip codes. If I have 1000+ names and need to extract 100+ zip
codes from them, what is easiest way to query this? I have tried to use the "IN" operator....like so..
In(19708,19709,19711,21201.......21907), but apparently I am inputting more than the 1024 characters allowed in the query wizard. I switched to SQL
view and inserted the wanted zip codes that way and it worked at first, but then I did something wrong and since then am tsol...(lost backwards!). Does any one have an idea on way to find some zip codes in a table of many?
Thanks, Willy

Nov 12 '05 #2

P: n/a
CDB
Put the required zips into a (temp) table, and join the two tables in the
outpu query.

Clive
"William Smith" <wi***@oya.com> wrote in message
news:10*************@corp.supernews.com...
Access 97 - need to extract from large database a dynaset of "contacts"
based on zip codes. If I have 1000+ names and need to extract 100+ zip
codes from them, what is easiest way to query this? I have tried to use the "IN" operator....like so..
In(19708,19709,19711,21201.......21907), but apparently I am inputting more than the 1024 characters allowed in the query wizard. I switched to SQL
view and inserted the wanted zip codes that way and it worked at first, but then I did something wrong and since then am tsol...(lost backwards!). Does any one have an idea on way to find some zip codes in a table of many?
Thanks, Willy

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.