Excluding data from a query

M

M.Garza

Hello, you guys have helped me out on other ACCESS issues. I have a
query that excludes certain criteria using a Between and clause but I
need to exclude more cirteria from that query and I can't seem to get
it right. This database tracks advertising on buses by side (three).

Currently, I am querying each bus side seperatley: STREET, BACK,
QUEEN. On the STREET side we place KING ads, on the BACK side we
place TAILLIGHT ads, and on the CURB side we place QUEEN ads.
But....we cannot use the STREET side of 75 of those buses for the KING
ads because the bus is too small, we can only place QUEENS on that
side. I set up a query that pulls all STREET sides that are not
between 7000 and 7075 (# series of those buses), so it excludes those
buses and only counts the others that we are able to place KINGS on.
Problem is I have another set of numbers that I need to exclude in
addition to the 75 above. When I go into the criteria section of the
query and try to add to the not between clause the other information
still shows up. My criteria ends up looking like:

Bus Number: Not between "7000" and "7075" and "9100" and 9128"

but it only exludes the "7000" and "7075" leaving all the other buses
that fall within the 9100 to 9128 series.

How can I exclude all buses that fall withinn 7000 and 7075 as well as
9100 and 9128?

If you need more clarification on how I set things up, please let me
know. Any help is greatly appreciated.

Maria
 
T

tina

hmm, i've never tried to double up a Between...And criteria before, but you
might give the following a try, as

Not Between "7000" And "7075" And Not Between "9100" And 9128"

the above goes all on one line in the query criteria grid, regardless of
line-wrap in this post. if it doesn't work as written, you might try a
variation, as

(Not Between "7000" And "7075") And (Not Between "9100" And 9128")

hth
 
M

M.Garza

hmm, i've never tried to double up a Between...And criteria before, but you
might give the following a try, as

Not Between "7000" And "7075" And Not Between "9100" And 9128"

the above goes all on one line in the query criteria grid, regardless of
line-wrap in this post. if it doesn't work as written, you might try a
variation, as

(Not Between "7000" And "7075") And (Not Between "9100" And 9128")

hth












- Show quoted text -

This worked perfectly! Thank you so much Tina for helping me figure
this out!

Maria
 

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