How to Browse with Mixed Read-Only and Read/Write FieldsLast reviewed: June 27, 1995Article ID: 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.
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:
BROWSE FIELDS ; custno=cno, companynm = company, yrlypurch = ytdpurch, ; contact, address, city 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:
BROWSE FIELDS ; cno:R, company:R, ytdpurch:R, ; contact, address, city |
Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a 2.50b locked
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |