DOCUMENT:Q121723  10-NOV-1994  [FOXPRO]
TITLE   :INF: How to Display Any Column of an Array in a List or Popup
PRODUCT :Microsoft FoxPro
PROD/VER:2.5x 2.60 2.60a | 2.00 2.5x 2.60 2.60a | 2.5x 2.60a | 2.60
OPER/SYS:WINDOWS         | MS-DOS               | MACINTOSH  | UNIX
KEYWORDS:kbprg kbcode

--------------------------------------------------------------------
The information in this article applies to:

 - Microsoft FoxPro for Windows, versions 2.5x, 2.6, 2.6a
 - Microsoft FoxPro for MS-DOS, versions 2.0, 2.5x, 2.6, 2.6a
 - Microsoft FoxPro for Macintosh, versions 2.5x, 2.6a
 - Microsoft FoxPro for UNIX, version 2.6
--------------------------------------------------------------------

SUMMARY
=======

By default, a list or popup shows the information from the first column of
a multiple-column array. The method below describes how to display
information from any of the columns.

MORE INFORMATION
================

NOTE: This example assumes that the CUSTOMER.DBF table has been installed
in FoxPro's TUTORIAL subdirectory.

To display any column of an array in a list or popup, use the Screen
Builder to perform the following:

1. In the Setup Code snippet of a test screen, type the following:

     SET DEFAULT to <FoxPro_directory>\tutorial
     SELECT company, city, state FROM customer INTO ARRAY a3colmns

2. Create a list or popup object. For a list, select the From Array radio
   button. For a popup, select the Array Popup radio option button.

3. Type A3COLMNS in the Array Popup text box.

4. In the Variable text box, type "M.COL" (without the quotation marks).

5. Choose 1st Element.

6. Verify that the Expression radio button is selected. Then type the
   number 1, 2, or 3 in the text editing region. The number you type
   designates which of the three array columns will be displayed.

8. Generate and run the screen.

NOTE: The first column of the array contains COMPANY field data, the second
contains CITY field data, and the third contains STATE field data from the
CUSTOMER.DBF table.

Additional reference words: FoxUnix FoxMac FoxDos FoxWin 2.00 2.50 2.50a
2.50b 2.50c 2.60 2.60a different other many specific only multi-column
multicolumn multi-dimension multiple-dimension dimension genscrn.prg power
tool
KBCategory: kbprg kbcode
KBSubcategory:

=============================================================================

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS
PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND.  MICROSOFT DISCLAIMS
ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN NO
EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR
ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL,
CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF
MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.  SOME STATES DO NOT ALLOW THE EXCLUSION
OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES
SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1994.