Microsoft KB Archive/114249

= PRB: NOEDIT Clause of BROWSE Command Ignored in Program Mode =

Article ID: 114249

Article Last Modified on 12/3/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft FoxPro 2.5b
 * Microsoft FoxPro 2.5a
 * Microsoft FoxPro 2.5b
 * Microsoft FoxPro 2.6 Standard Edition
 * Microsoft FoxPro 2.0
 * Microsoft FoxPro 2.5b for MS-DOS
 * Microsoft FoxPro 2.5a
 * Microsoft FoxPro 2.5b for MS-DOS
 * Microsoft FoxPro 2.6 for MS-DOS
 * Microsoft FoxPro 2.5b for Macintosh

-



This article was previously published under Q114249



SYMPTOMS
The NOAPPEND and NOEDIT|NOMODIFY clauses of the BROWSE command have no effect on programmatic editing commands such as APPEND BLANK or REPLACE.



RESOLUTION
When you are calling a BROWSE command programmatically in a situation where adding a record may be desired but editing is not, issue the BROWSE command with a WHEN clause that returns FALSE so that editing any new or existing records is impossible. For example:

BROWSE NOAPPEND NOEDIT WHEN .F.

NOTE: Although this command will prevent interactive editing of the BROWSE, remember that programmatic editing is still functional. The only way to prevent programmatic editing is to open the database in a read-only format (with the NOUPDATE clause).



Steps to Reproduce Behavior
  In the Command window, issue the following commands: USE BROWSE NOAPPEND NOEDIT APPEND BLANK  Try to enter data in the newly added record. Try to edit any previously existing record.

Since the NOAPPEND and NOEDIT|NOMODIFY clauses of the BROWSE command are intended to affect only the interactive use of a BROWSE, programmatic editing is still possible.

Additional query words: VFoxWin FoxMac FoxDos FoxWin

Keywords: KB114249

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.