>>The only 100% effective way, and it's expensive in terms of overhead, is to insert a UDF() in the WHERE (and if in use, the HAVING clause as well) that calles DOEVENTS(). VFP is not happy being interrupted in the midst of executing a single line of code, with the result that it oftens seems to be not responding in Task manager, and it ignores standard Windows messages in this context as well.
>
>What is the bigger overhead, the UDF or the DOEVENTS? Sometimes you put a UDF in the where clause for updating wait windows for example.
Yep, in which case, you're already calling out of the single line of code. Both the UDF and DOEVENTS are "expensive", since neither is optimizable, the DOEVENTS in particular because lots of things like timers and controls might geenerate events that otherwise VFP would just queue up until it finished the current statement.