>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