473,394 Members | 1,709 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How to query for multiple criteria?

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
2 4958
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Andy | last post by:
Hello, I am having many problems with setting up a parameter query that searches by the criteria entered or returns all records if nothing is entered. I have designed an unbound form with 3...
3
by: Pea | last post by:
Is it possible to get the average in a query where I have multiple criteria? Here's an abbreviated example of the query in design view: Fields: USERID DATE TIME ID_TYPE...
0
by: starace | last post by:
I have designed a form that has 5 different list boxes where the selections within each are used as criteria in building a dynamic query. Some boxes are set for multiple selections but these list...
1
by: Robert | last post by:
I am trying to create a db for service providers by county. I'm relatively new to db programming, but I have done quite a bit of programming ranging from the old basic days up to doing some...
4
by: carl.barrett | last post by:
Hi, I have a list box that displays 2 columns. Behind it sits a query with five columns. These are Column1 (DOB), column2 (a concatenated string of Surname Forname, Title), Column3 (Surname),...
3
by: dskillingstad | last post by:
I'd appreciate any help I can get. I'm not sure what I'm doing wrong, but.... I've searched these groups for some solutions but no luck. I have an unbound form (frmSearch), with several unbound...
0
by: Greg Strong | last post by:
Hello All, In the past I've used a combo box with the 'row source' being an Access SQL union query to select "All" or 1 for only 1 criteria in a query. An example is as follows: SELECT 0 As...
4
by: Stan | last post by:
I am using MS Office Access 2003 (11.5614). My basic question is can I run a query of a query datasheet. I want to use more that one criteria and can not get that query to work. I thought I...
6
by: jmarcrum | last post by:
Hi! I have created a Union Query in ACCESS 2003, that combines 130 records from one query (Extra Foreman Radios) and 250 records from another query (Forman Main Radios). I have created a...
4
by: dizzydangler | last post by:
Hi all, I am a new Access user and just starting to get my head around some of the basic concepts, so please take it easy on me :) My company has been managing client records on excel, and I’m in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.