FIX: Forms Collection Exposes Memo and General Windows (161187)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 5.0

This article was previously published under Q161187

SYMPTOMS

The Count property of the Forms collection incorrectly sees open memo and general edit windows as members of the Forms collection. The Forms collection is a property of the _VFP system variable.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem has been fixed in Visual FoxPro 5.0a.

MORE INFORMATION

According to the Help topic on the _VFP system variable, the Forms property is:

"An array to access individual forms in a form set."

Therefore, the open memo and general field edit windows should not appear to this property as members of the forms collection. The example below illustrates this behavior.

Steps to Reproduce Problem

  1. Open the Employee table located in the \Samples\data folder.
  2. Browse the table and double-click on the Photo and Notes fields to open these fields in their own windows.
  3. Type the following command in the Command window:
       "WAIT WINDOW STR(_VFP.Forms.Count):
    						
    Notice that the number two (2) appears in the wait window.

    Note that this behavior does not exhibit itself when the edit windows are invoked in the following manner:
       USE HOME()+"\samples\data\employee"
       MODIFY GENERAL photo
       MODIFY MEMO notes
       WAIT WINDOW STR(_VFP.Forms.Count)
    						
    Note that the number zero (0) appears in the wait window.

Modification Type:MajorLast Reviewed:10/16/2002
Keywords:kbBug kbProgramming kbvfp500aFIX KB161187