Beginner here ...

  • Thread starter Thread starter Rob
  • Start date Start date
R

Rob

Let's say I have 3 columns, 100 records ..

Each field can only have a value of 1 through 50

I want to query any records that have 2 or 3 or 13 in any of the three
columns.

Wouldn't it be:

Field 1 (column A) criteria: 2 or 3 or 13
Field 2 (column B) OR: 2 or 3 or 13
Field 3 (column C) OR: 2 or 3 or 13

Let's say that get me 12 records.

However, if I only use Field 1 and Field 2, I get more records? I guess it
will take me awhile to get in Access 'mode'. I would like that if I want to
check all the columns for the existing of three numbers, I would use the OR
for all fields, right? Doesn't seem to work that way.

Help ... thanks, Robert
 
Rob,

In the query design view, you will notice that in the grid there are several
lines available for criteria; the idea is that criteria on different fields
in the same line are bound with an AND operator, whereas separate lines are
bound with an OR operator.
So, if you want records where the value of all three fields is (2 or 3 or
13) you should put your criteria in the same line; if you want records where
any fo the three fields is (2 or 3 or 13), then the criteria for each field
should be entered in separate lines.

HTH,
Nikos
 
Back
Top