Microsoft KB Archive/100807

{| = PRB: Record Can Be Modified After Issuing BROWSE NOMODIFY =
 * width="100%"|

ID: Q100807

The information in this article applies to:


 * Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, 2.5a, 2.5b, 2.6
 * Microsoft FoxPro for WINDOWS, versions 2.5, 2.5a, 2.5b, 2.6

SYMPTOMS
When an APPEND BLANK command is issued while a BROWSE NOMODIFY window is open, you can edit the record just added.

CAUSE
By design, BROWSE NOMODIFY will allow the record that was added during the BROWSE NOMODIFY session to be edited.

RESOLUTION
To make this record read-only, reissue the BROWSE NOMODIFY command. For example:

1. In the Command window, type the following:

MODIFY COMMAND TEST 2. Enter the following commands in the TEST.PRG file: ON KEY LABEL CTRL+N DO MYADD BROWSE NOMODIFY NOMENU

PROCEDURE MYADD APPEND BLANK BROWSE NOMODIFY NOMENU 3. From the File menu, choose Save. 4. In the Command window, type:

DO TEST.PRG 5. Press CTRL+N to add a new record. You cannot edit the new record. Another valid workaround is to issue the following command:

BROWSE WHEN .F. This will not allow even the new record created with the APPEND BLANK to be updated. Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a 2.x BROWSE NOMODIFY editable modify alter change 2.50b 2.60 KBCategory: kbprg kbprb KBSubcategory: FxprgBrowse
 * }