Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error with Locate
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00270752
Message ID:
00270757
Views:
27
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform