How to Create a Field List Interactively in FoxPro for Windows

Last reviewed: August 15, 1995
Article ID: Q134883
The information in this article applies to:
  • Microsoft FoxPro for Windows, version 2.6a

SUMMARY

While the FoxPro interface offers a number of dialog boxes presenting a list of fields from which sets can be chosen, the Browse menu options do not permit fields to be specified. However, it is possible to construct a Browse statement in the Command window that contains a list of fields picked through the user interface, without resorting to programming.

NOTE: The following workaround is not available from Catalog Manager.

MORE INFORMATION

The Browse option is available from either of the following menu locations:

  • On the Database menu, click Browse.

    -or-

  • On the Window menu click Work Area View and then Browse.

When you use either of these options, the BROWSE LAST command is issued to the system, as you can see by examining the Command window. Provided the resource file is enabled, the BROWSE LAST command displays the fields and layout in which the BROWSE for the currently selected table was last viewed.

To specify which fields are to be viewed in a Browse, you must issue the BROWSE command from the Command window. Unfortunately, interactively specifying more than a dozen or so fields in the Command window is a tedious and time-consuming process. Also, you must re-enter the entire command if:

  • The completed command is not saved in a program file before you exit from FoxPro.

    -or-

  • You need to display different fields.

    -or-

  • The resource file is not enabled.

Because of this, you may want to use the following steps during interactive sessions:

Steps to Create the Browse Field List Interactively

  1. Ensure that both the Command window and the database are open.

  2. On the Database menu, click Append From.

  3. In the From field, enter a non-existing filename (such as 'ZZZ').

  4. Click the Fields button, and choose the fields you want.

  5. Leave the File Type selected at the default: Table (DBF).

  6. Optionally, select any desired Criteria, such as For.

  7. Once all clauses have been specified, choose Append.

  8. Press any key when you see the error "File 'zzz.dbf' does not exist." This is a harmless error that you can ignore.

  9. In the Command window, select APPEND FROM ZZZ, type BROWSE, and then Return.

Once the Browse has executed, the displayed fields can be modified by scrolling up to the command in the Command window and locating the desired fields in the FIELDS list.


Additional reference words: FoxWin 2.60a list box dBASE browser popup
fieldlist
KBCategory: kbui
KBSubcategory: FxotherGeneral


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.

Last reviewed: August 15, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.