PRB: Record Can Be Modified After Issuing BROWSE NOMODIFY

Last reviewed: June 27, 1995
Article 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


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: June 27, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.