Difference between revisions of "Microsoft KB Archive/107802"

From BetaArchive Wiki
m (Text replacement - "<" to "<")
m (Text replacement - ">" to ">")
 
Line 12: Line 12:
 
You can output different matches in the same field by either issuing a FOR clause or using the INLIST() function. For example:
 
You can output different matches in the same field by either issuing a FOR clause or using the INLIST() function. For example:
  
<pre>  REPORT FORM <file&gt; FOR fname = "George" or fname = "Mike"
+
<pre>  REPORT FORM <file> FOR fname = "George" or fname = "Mike"
  
 
   -or-
 
   -or-
  
   REPORT FORM <file&gt; FOR INLIST(fname,"George","Mike")
+
   REPORT FORM <file> FOR INLIST(fname,"George","Mike")
 
</pre>
 
</pre>
 
Both commands will output all records with "George" or "Mike" in the FNAME field.
 
Both commands will output all records with "George" or "Mike" in the FNAME field.

Latest revision as of 16:45, 20 July 2020

Searching for a Series of Matches in a Field for a Report

ID: Q107802

The information in this article applies to:

  • Microsoft FoxPro for Windows, versions 2.5, 2.5a, and 2.5b
  • Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, 2.5a, and 2.5b

You can output different matches in the same field by either issuing a FOR clause or using the INLIST() function. For example:

   REPORT FORM <file> FOR fname = "George" or fname = "Mike"

   -or-

   REPORT FORM <file> FOR INLIST(fname,"George","Mike")

Both commands will output all records with "George" or "Mike" in the FNAME field. NOTE: The INLIST() function can search for up to 24 sets of expressions. However, you may not be able to use 24 sets of expressions because of the 254-character limit on the command line.

Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a 2.50b list choices KBCategory: kbprg KBSubcategory: FxprgGeneral


Last Reviewed: June 27, 1995
© 1999 Microsoft Corporation. All rights reserved. Terms of Use.