How to Create a Field List Interactively in FoxPro for Windows

ID: Q134883

The information in this article applies to:

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:

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:

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

Last Reviewed: August 15, 1995