![]() |
|
|
Welcome to the { mindfrost82.com } forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Multiple criteria in a query
I am trying to make a query with multiple criteria in it. Every time i
add the second criteria to the line it dosent filter out that criteria. For example i need to create a query that tells me everybody in an office with equipment that dosent have a serial number, but i need to filter out any software or anything that is not hardware. So i create the query and i s Not "software" and "Office". When i run the query it does not filter out software or office. How do i fix this. Keep in mind i did not build the db so the relationships might be a little crazy. Any help would be great. Thanks |
|
|||
|
Re: Multiple criteria in a query
Jason,
Try... Not "Software" and Not "Office" or <> "Software" And <> "Office" -- hth Al Campagna Microsoft Access MVP http://home.comcast.net/~cccsolutions/index.html "Find a job that you love... and you'll never work a day in your life." "Jason Marino" <jmarino@mahoneycohen.com> wrote in message news:uKe8PBK%23IHA.1512@TK2MSFTNGP06.phx.gbl... >I am trying to make a query with multiple criteria in it. Every time i add >the second criteria to the line it dosent filter out that criteria. > > For example i need to create a query that tells me everybody in an office > with equipment that dosent have a serial number, but i need to filter out > any software or anything that is not hardware. > > So i create the query and i s Not "software" and "Office". When i run the > query it does not filter out software or office. How do i fix this. Keep > in mind i did not build the db so the relationships might be a little > crazy. Any help would be great. Thanks |
|
|||
|
RE: Multiple criteria in a query
I suggest you repost your question in the Queries group and include the SQL
of the query so someone can evaluate your problem. -- Dave Hargis, Microsoft Access MVP "Jason Marino" wrote: > I am trying to make a query with multiple criteria in it. Every time i > add the second criteria to the line it dosent filter out that criteria. > > For example i need to create a query that tells me everybody in an > office with equipment that dosent have a serial number, but i need to > filter out any software or anything that is not hardware. > > So i create the query and i s Not "software" and "Office". When i run > the query it does not filter out software or office. How do i fix this. > Keep in mind i did not build the db so the relationships might be a > little crazy. Any help would be great. Thanks > |
|
|||
|
RE: Multiple criteria in a query
For those without serial numbers you need to restrict the results to rows
where: SerialNumber IS NULL assuming that the column will be NULL, rather than a zero-length string or 0 of course. To exclude anything which is not hardware you can use NOT IN(<value list>). So in the first criteria row of the SerialNumber column enter: IS NULL and in the first 'criteria' row of the EquipmentType column enter: NOT IN("Office", "Software") Ken Sheridan Stafford, England "Jason Marino" wrote: > I am trying to make a query with multiple criteria in it. Every time i > add the second criteria to the line it dosent filter out that criteria. > > For example i need to create a query that tells me everybody in an > office with equipment that dosent have a serial number, but i need to > filter out any software or anything that is not hardware. > > So i create the query and i s Not "software" and "Office". When i run > the query it does not filter out software or office. How do i fix this. > Keep in mind i did not build the db so the relationships might be a > little crazy. Any help would be great. Thanks > |
![]() |
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|