>Hi,
>
>I call a function that exists in a .prg from within the method of a form. This function has a locate statement. I get the following error "THIS can only be used within a method" on the locate statement if I add a filter to the table. Is this not possible to do? If I then run the same code without the filter I do not get the error.
>
>I am pretty confused here....does anybody have any experience with this error message on a filtered table?
>
>Thanks,
>
>Paul
If you set filter using some form's custom property, e.g.
SET FILTER TO myfield=thisform.myproperty
then it goes out of scope when you call external Prg. Naturally enough it happens when VFP tries to move record pointer (Locate) and apply filter.
Edward Pikman
Independent Consultant