Microsoft KB Archive/90460

{|
 * width="100%"|

Print Merge Error Message: Syntax Error in Field Condition

 * }

Q90460

-

The information in this article applies to:


 * Microsoft Word for Windows, versions 1.0, 1.1, 1.1a, 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c, 6.0, 6.0a, 6.0c

-

SUMMARY
In Word for Windows, the following error messages occur during a print merge operation if a condition is missing from a NEXTIF, IF, or SKIPIF field or if the field does not contain proper spacing:

There is a syntax error in a field condition.

Syntax error in field condition.

MORE INFORMATION
Use NEXTIF, IF, and SKIPIF fields in a print merge main document to specify the conditions under which a record should be merged. In the following example, Word for Windows only merges records if the ZIP field contains &quot;98008:&quot;

  {NEXTIF zip = 98008} {name} {street} {city}, {state} {zip}

Missing Condition
Switch to field codes view and verify that each NEXTIF, IF, and SKIPIF field in the document contains a condition. If you do not specify a condition, the error messages occur and the print merge operation stops.

The following example demonstrates an incorrectly used NEXTIF field:

  {NEXTIF zip} The following example demonstrates a correctly used NEXTIF field:

  {NEXTIF zip = 98008}

Incorrect Spacing
The error messages occur if the spacing in any NEXTIF, IF, or SKIPIF field is incorrect. Each field must contain a space between each expression and the operator. In the following example, there must be a space between &quot;NEXTIF&quot; and &quot;zip&quot;, between &quot;zip&quot; and &quot;=&quot; and between &quot;=&quot; and &quot;98008&quot;:

  {NEXTIF zip = 98008}