Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Access the Name property of a combobox.
Message
De
26/11/2003 09:01:10
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00853637
Message ID:
00853642
Vues:
15
>I have five comboboxes based on my class "cbocombopopup". I want to use the Right-Click method of this class to popup another form that has a grid with my "metadata" table as the record source. I want to filter the table according to which subclassed combobox the user right clicks on. Why does this work in the Right-Click method of my Class, the name of the subclassed combobox is "cboRef":
>
>
>   IF This.Parent.Name = "frmQuoteNum"
>     SELECT metadata
>     SET FILTER TO ALLTRIM(datafield) = "cboRef"
>   ENDIF
>
>
>...but this doesn't work:
>
>
>  IF This.Parent.Name = "frmQuoteNum"
>     SELECT metadata
>     SET FILTER TO ALLTRIM(datafield) = ALLTRIM(This.Name)
>  ENDIF
>
>
>Right now I'm ending up using the first example with DO CASE ...ENDCASE statements for the name of each combobox that I want to use this for. But I'd like to know why I can't just refer to the "This.Name" property in my Filter statement.
>
>
>Thank you.


Elgin,

The case of the name property may be the problem.

did you try
&& to trace it
acti screen
?This.Parent.Name

IF( lower(This.Parent.Name) == lower("frmQuoteNum") )
I would rather add a property which holds the filter expression. Don't like to use the Name for filter expressions
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform