BUG: Grid Based on .QPR File Appears Blank in Visual FoxPro 5.0

Last reviewed: January 13, 1998
Article ID: Q179199
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, versions 5.0, 5.0a

SYMPTOMS

Running a form that contains both a grid and a list box or combo box that have the RowSource property set to the same .qpr file causes the grid to appear empty. This behavior does not occur in Visual FoxPro 3.0b.

RESOLUTION

In the Activate event of the form, set the RowSource of the grid to itself. For example:

   ThisForm.Grid1.RecordSource=ThisForm.Grid1.RecordSource

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Open the Orders table located in the \Samples\Tastrade\Data folder.

  2. Create a file called Ztest.qpr (make sure the extension is .qpr) that contains the following code:

          SELECT order_id, customer_id FROM orders INTO CURSOR temp
    

  3. Create a form called Ztest and add a Grid object to the form.

  4. Set the following properties of the grid:

          RecordSource=Ztest.qpr
          RecordSourceType=3-Query (QPR)
    

  5. Add a List box object to the form and set the following properties:

          RecordSource=Ztest.qpr
          RecordSourceType=4-Query (QPR)
    

  6. Run the form and note that the grid is empty.

In Visual FoxPro 3.0b, both the grid and the list box appear populated with data.

Keywords          : FxprgGrid vfoxwin
Version           : WINDOWS:5.0,5.0a
Platform          : WINDOWS
Issue type        : kbbug


================================================================================


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