Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
PARENT is not an object?
Message
De
12/12/1997 15:35:54
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00065410
Message ID:
00065653
Vues:
43
>>>>>There is no code is Requery()
>>>>Colin,
>>>>
>>>>What is the rowsource for the combo? Is that causing the error?
>>>
>>>Hi Jim,
>>>
>>>The rowsource is an SQL-SELECT which works fine. I know this because the combobox works fine and I have been able to requery it from other objects on the form, just not the grids AfterRowColChange.
>>Colin,
>>
>>I understand the issue, I was trying to see if the SELECT has any reference to Parent in it. It may a bug that VFP is confused and thinks the current control is the grid when the select is running and it is looking at the wrong Parent property.
>
>Sorry about that Jim, I misread your answer. The SQL in the RowSource is as follows:
>
>SELECT Buil, Buildesc FROM BUIL ;
>WHERE PB AND Proj=This.Parent.Parent.Column9.cboProj.Value ;
>INTO CURSOR cBuillist ORDER BY Buildesc

Do you mean that you use this as literal Combo.RowSource? It's really fragile construction because VFP will try this internally many times and this long reference can fail. I would use cursor alias as RowSource. In Grid.Afterrowcolumnchange event you can refill the cursor and requery the combo.
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform