>I inherited a Foxpro/Lan 2.0 application with no error trapping and I just recently added some error handling to some of the screens. Now sometimes users are getting an error message saying "file errmsg not found" The name of my error handling routine is errmsg. I have an ON ERROR command on a screen that has pushbuttons which open other screens that don't have the ON ERROR command. Is that what is causing the problem? Do I have to have error handling on all screens or none at all? Why do Foxpro's internally generated error messages not display when there is no error handling on a particular screen? Hope someone can help me. Thanks
Once you set errhandling routine with ON ERROR ... it's active until another ON ERROR .. is encountered. If you want to turn off it in screens, in setup code add a "ON ERROR" (set default error handling), and turn it on again where appropriate. Better yet keep your errhandler proc in proc file you set on entry so every time an error occurs it could be found.
Cetin