>I have a program that re-indexes my tables. However, I've noticed that when I turn on my error handling (ON ERROR DO ERRHAN) I get a "Structual CDX not found" error. When I leave the default VFP error handling on, there is no error. Here is the code that generates the error.
>
>IF !FILE('alt1.cdx')
> USE alt1 *** Error occurs on this line
> INDEX ON a_lname+a_fname TAG alt1
>ENDIF
>
>Does anyone know what would cause the error to be trapped by error handling, but not by the VFP default error handling? Or even why this statment would cause such an error? Thanks for any help.
>
>Marcus.
Marcus,
First the code you posted will gaurantee an error whenever the IF is true. When VFP's error handler is in effect it is ignoring the error for some reason. In your errorhandler you need to hanlde error #1707.