Multiple criteria in a query

J

Jason Marino

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
 
K

Klatuu

I suggest you repost your question in the Queries group and include the SQL
of the query so someone can evaluate your problem.
 
K

Ken Sheridan

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top