>If you don't have a code in Error event of the control and error occurs during the execution of some part of your code the form error event is called. If you don't have a code in error event of the form then Error handling routine seted by ON ERROR is called. If you don't have ON ERROR ... The default VFP error handler is fired.
Borislav,
I believe you are mistaken: if an error occurs in code for a control that has no Error method code, it does not automatically escalate to the form's Error event. That would have been a better design choice for VFP (IMO), but it doesn't work that way. One way around this problem is to avoid putting any code likely to encounter errors in a method of the form, and let the control invoke this form method, instead of doing it inline. Another solution would be to add some logic to the global ON ERROR handler to check for _screen.activeform. There are still more options, of course.
Mike