Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set filter with combobox
Message
 
À
21/08/2001 12:57:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00546844
Message ID:
00546862
Vues:
16
>Hello all
>
>i'v the following problem,
>
>i want to filter my grid upon a selection in a combo box
>so i tried :
>
>in combobox's click event:
>set filter to tablefield = this.value
>
>also tried to put this in valid event
>
>but in both cases i get the errormessage:
>"THIS can only be called from a method"
>
>thx
>
Christian,

I'd suggest populating the grid on-the-fly from from a query based on the combo box selection rather than a filter. One reason for this would be to avoid scoping problems and errors that will occur as a result. For example, open up a table, then create a new program file. Put the following, replacing "somefield" and "somevalue" as appropriate, in the new program file, highlight it and exectute
LOCAL lcvalue
lcvalue = somevalue
SET FILTER TO somefield = lcvalue
Now go to the command window and issue a BROWSE.

You'll get the error message that 'Variable "LCVALUE" is not found'
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform