For Full versions of my videos or to join my mailing list go to : http://www.pcwebinars.com access query using or row - How to make a query in Access that uses the OR row - 2007 2010 2013 2016
in this query we're going to talk about
using the or row to do an either or
situation uh if you notice this
particular criteria that's on the screen
um it has between January 1st and March
31st and on the same row it says greater
than 500 in the order amount column so
when we run this
query if you notice all of the records
are in that date range and they're also
over
$500 so when the criteria is on the same
row everything on the same row all has
to be true at the same time uh let's try
a different example I'm going to go back
to the view row so now I'm going to
delete the greater than 500 from the s
from the criteria row and notice over
here we have an or row so I want to pick
on the or row of the order amount I want
to pick on greater
than
500 now if I run
that notice how this one is from
1998 but it's over $500 so now either
either of the conditions have to be true
they don't both have to be true at the
same
time okay let's find another
example uh let's see if I can find
different data
here here's a record over here the $70
it's less than
$500 but it's within the date range so
like I said either one of the conditions
have to be true they don't both have to
be true at the same time when we use the
or
row so here's the general rule if
criteria is on the same row as something
else then everything on the same row has
to be equal it has to be true to be
included in the query but in this case
it either has to be the date range or
the order amount has to be over $500
because I put that on the or row now uh
if you notice below the or row you have
all these blank rows so that means you
can have you know this or this or this
all the way down as many as you wanted
to uh I'm going to get rid of that
example there and if I put it back to
being on the same row I'm going to say
greater than
500 now when we run the query
now they're in the uh the date field is
true and also they're all over $500
because the criteria is on the same row
so your your queries can be as
complicated as you need them to be and
you're going to mix and match all these
different examples but that's what the
Oro is all about it allows you to do
logical ores uh you know like this or
that within your query