How to Browse with Mixed Read-Only and Read/Write FieldsID: Q107195 The information in this article applies to:
SUMMARYThe BROWSE FREEZE command allows a single field in a Browse window to be modified, with the remainder of the fields automatically browsed as read- only fields. It is often desirable to have a mixture of several fields that are read-only and several fields that are read/write in the Browse window. There are three methods (described below) that can be used to accomplish this.
MORE INFORMATIONThe three methods below browse the FOXPRO\TUTORIAL\CUSTOMER database, with the CNO, COMPANY, and YTDPURCH fields being read-only, and the CONTACT, ADDRESS and CITY fields being read/write.
Method 1: Using the BROWSE FORMAT CommandA format file can be used to control the Browse window. The row and column positions are not important. To browse a read-only field, place an @ ... SAY <field> command in the file. To browse a read/write field, place an @ ... GET <field> command in the file. If a read/write field has a PICTURE, WHEN, or VALID clause associated with it, add the clause at the end of the @ ... GET command in the format file. 1. Create a format file using the following command:
2. Place the following commands in the format file:
3. Save the file and issue the following command to activate the format
4. Issue the following command to begin the browse:
5. After the browse is complete, deactivate the format file with the
Method 2: Using Calculated Fields on the BROWSE STATEMENTThe second method involves using a calculated field on the BROWSE command itself for each read-only field desired. This method takes fewer steps; however, it requires that a calculated field name be created for each read- only field. For example, issue the following command:
Method 3: Using the :R Option with a Fields ListThe third method involves using a read-only (:R) specifier for each field that should be read-only. For example, issue the following command:
Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a 2.50b locked
multiple
many
KBCategory: kbprg
KBSubcategory: FxprgBrowse
|
|
Last Reviewed: June 27, 1995 © 1999 Microsoft Corporation. All rights reserved. Terms of Use. |