Microsoft KB Archive/141633

= PRB: Form with Subclassed Combo Looks for RowSource from Class =

Article ID: 141633

Article Last Modified on 9/30/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition

-



This article was previously published under Q141633



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.



Steps to Reproduce Behavior
 Create a new class based on Combobox.  Set the following properties of the combo box within the Class Designer: RowSource       =  Select * from xxx into cursor yyy RowSourceType   =  3 - SQL STATEMENT  Save the combo box class. Create a new form. Place a combo box from the newly created class onto the form.  Change the Rowsource of the combo box to: Select * from customer into cursor query </li> Add Vfp\Samples\Data\Customer.dbf to the Data Environment.</li> 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

</li></ol>

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

Additional query words: VFoxWin

Keywords: KB141633

-

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

© Microsoft Corporation. All rights reserved.