Query AND criteria

  • Thread starter Thread starter Fly Boy 5
  • Start date Start date
F

Fly Boy 5

I'm trying to find models 250, 350, 550 and 750 by using "And" criteria. It
seems to only work with two of the four.

Any help would be appreciate.

JW
 
Fly said:
I'm trying to find models 250, 350, 550 and 750 by using "And"
criteria. It seems to only work with two of the four.

Any help would be appreciate.


If you want to find all of those at once that is an OR, not an AND. Don't
think of criteria as...

I want to see 250 AND 350 AND 550 AND 750

The correct logic is...

I want to see records where this field is 250 OR 350 OR 550 OR 750.
 
I would think that you would need to use OR criteria. The value in the
field is 250 or 350 or 550 or 750.

If the field is a number field you could use

Field: Models
Criteria: In (250,350,550,750)

If text you have a couple of alternatives

Field: Models
Criteria: In ("250","350","550","750")

Or with those specific numbers in a text field

Field: Models
Criteria: Like "[2357]50"

Or

Field: Models
Criteria (Line 1): 250
Criteria (Line 2): 350
Criteria (Line 3): 550
Criteria (Line 4): 750


'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 
Rick,

Thanks a lot for your excellent help.

JW

Rick Brandt said:
If you want to find all of those at once that is an OR, not an AND. Don't
think of criteria as...

I want to see 250 AND 350 AND 550 AND 750

The correct logic is...

I want to see records where this field is 250 OR 350 OR 550 OR 750.
 
Rick got me squared away, but I really appreciate your infomation.

JW

John Spencer said:
I would think that you would need to use OR criteria. The value in the
field is 250 or 350 or 550 or 750.

If the field is a number field you could use

Field: Models
Criteria: In (250,350,550,750)

If text you have a couple of alternatives

Field: Models
Criteria: In ("250","350","550","750")

Or with those specific numbers in a text field

Field: Models
Criteria: Like "[2357]50"

Or

Field: Models
Criteria (Line 1): 250
Criteria (Line 2): 350
Criteria (Line 3): 550
Criteria (Line 4): 750


'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================

I'm trying to find models 250, 350, 550 and 750 by using "And" criteria. It
seems to only work with two of the four.

Any help would be appreciate.

JW
 
Back
Top