Re: Criteria
From: John Vinson (jvinson_at_STOP_SPAM.WysardOfInfo.com)
Date: 03/14/05
- Next message: Dave Cullen: "Re: getting dates from text"
- Previous message: Tom Lake: "Re: Rounding Up to Nearest Multiple of 10"
- In reply to: idontgetit: "Criteria"
- Next in thread: idontgetit: "Re: Criteria"
- Reply: idontgetit: "Re: Criteria"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 14 Mar 2005 11:37:25 -0700
On Mon, 14 Mar 2005 07:51:04 -0800, "idontgetit"
<idontgetit@discussions.microsoft.com> wrote:
>Is it possible to choose more than one value in the same field using the
>"AND" criteria. For example: I have a listing of store #'s in one field and
>a map of that store number in another field. I want to type store # 5.6.7.8
>and 9 and have the query pull all 5 of those stores. What do I type as the
>criteria?
>Thank you VERY much!
AND and OR are *NOT* English language conjuctions: they are Boolean
logical operators. X AND Y is TRUE if both X and Y are TRUE
expressions; if either is FALSE then X AND Y evaluates to FALSE.
A query criterion is a logical expression; if it evaluates to TRUE
then the record is retrieved, and if it's FALSE the record is skipped.
So if you have [Store Number] = 5 AND [Store Number] = 6 you will
never retrieve any stores, because for any individual record, the
store number cannot possibly be equal to 5 and also equal to 6!
Two suggestions: you can use OR criteria (i.e. retrieve this record if
the store number is 5, OR the store number is 6); or you can use the
IN() operator. Put
IN (5, 6, 7, 8)
on the criteria line and it will (again using OR logic) return records
for any of the selected values.
John W. Vinson[MVP]
- Next message: Dave Cullen: "Re: getting dates from text"
- Previous message: Tom Lake: "Re: Rounding Up to Nearest Multiple of 10"
- In reply to: idontgetit: "Criteria"
- Next in thread: idontgetit: "Re: Criteria"
- Reply: idontgetit: "Re: Criteria"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|