One of the solutions:
RELEASE aa
ON ERROR AERROR(aa)
USE c:\coops\sta_mstr
on error
IF type("aa[2]")="C" and "index corrupted"$aa[2]
endif
But I would not do it this way. I would first investigate the cause of corruption in the code. Also if the table is part of the database, then probably you should validate the database and/or perform other steps for maintenance.
>On one form of mine, I use a table which is local and used exclusive. Thie table often has it's index become corrupt and gives the message ...Tablename or one of it's members... index may have become corrupt or missing... This is always a small table and since it is local and exclusive, it would be easy to simply rebuild the index quickly when this error occurs. Is there some coding that will tell me when this specific error occurs so I could rebuild it if this condition is true other than using the general on error check?