PRB: Form with Subclassed Combo Looks for RowSource from Class

Last reviewed: December 25, 1995
Article ID: Q141633
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, versions 3.0 and 3.0b

SYMPTOMS

When attempting to run a form, an error occurs if the form cannot locate the table or fields specified in the rowsource of the parent class. This is the result of a class based on a combo box being used as a template to design a new combo box. Within the class, the RowSource property of the combobox is set to:

   Select xxx.field1,xxx.field2 from xxx into cursor query

In the Form Designer a combo box from this class is used and the RowSource is changed to a different value.

WORKAROUND

Do not specify a value of the RowSource in the parent class of the combo box.

STATUS

Microsoft is researching this behavior and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new class based on Combobox.

  2. Set the following properties of the combo box within the Class Designer:

       RowSource        =  Select * from xxx into cursor yyy
       RowSourceType    =  3 - SQL STATEMENT
    
    

  3. Save the combo box class.

  4. Create a new form.

  5. Place a combo box from the newly created class onto the form.

  6. Change the Rowsource of the combo box to:

    Select * from customer into cursor query

  7. Add Vfp\Samples\Data\Customer.dbf to the Data Environment.

  8. Run the form. An open table dialog box appears for you to select the table because table xxx cannot be located. After you select a table, the following error occurs:

    Error loading file - parent - record number ???. SQL Column 'Field1' is not found

NOTE: If the select statement is removed from the RowSource property of the combobox class, the error does not occur.


Additional reference words: 3.00 3.00b VFoxWin
KBCategory: kbtool kbprb
KBSubcategory: FxtoolClassdes


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