WD: Use of "AND" and "OR" with Print Merge Selection RulesLast reviewed: February 5, 1998Article ID: Q79266 |
The information in this article applies to:
SUMMARYIn Word, you can define "rules" that determine whether or not a specific record is included in a print merge. It is important to understand the difference between the English language meaning of "AND" and the logical meaning of "AND" to use these rules effectively.
MORE INFORMATIONThe English language meaning of "AND" is equivalent to the logical meaning "OR." For example, suppose you have a data file that includes a STATE field and you want to perform a print merge of the records for the STATE fields of North Carolina and Washington. In English, you say "Include the records for North Carolina AND for Washington." Logically, however, the statement is written as "Include the records where STATE is North Carolina OR STATE is Washington." When you use a logical "AND," both conditions must be true in order for the expression to be evaluated as true. If you write the statement "to include the records where STATE is North Carolina AND STATE is Washington," it is logically impossible for both conditions to be true in the same record. The state cannot be both North Carolina and Washington; it has to be one or the other. Below is a chart that describes how logical "AND" and "OR" are evaluated.
If X=A OR Y=B If EITHER is true, the record is included. If X=A AND Y=B If BOTH are true, the record is included. REFERENCES"Microsoft Word for Windows User's Guide," version 2.0, pages 634, 670
|
KBCategory: kbusage
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |