May I also make a comment on the actual error message dialogue. I assume this is generated by your custom error-handler.
In my opinion, you should never give your end-users the choice of Abort, Retry, Ignore when displaying an error message. Allowing users to ignore an error will nearly always lead to further problems. Once an error has been detected, you can't be sure about anything within your program's environment. You don't know what variables are still in scope, what work areas are still open, or many similar things. Allowing the program to continue running on those circumstances is a bad idea.
The Retry option is fairly useless. If the program encounters an error in a particular line of code, the error will still be there when the same line is executed again.
The only time I would allow Retry after an error is if the error is something that is within the user's control. For example, if it results from a lack of disk space or a lack of write/update permission. In those cases you might give the user the opportunity to fix the problem and try again. Or, if it is a file/record locking issue, you might invite the user to wait until the lock is released and then try again. But in all other circumstances, there is no point in allowing a retry - it just raises users' hopes.
Finally - and less important - I prefer to avoid certain emotive terms, and "abort" is one of them. "Cancel" expresses the idea just as well without any emotional connotations.
For all the above reasons, when encountering a non-recoverable error, just politely tell the user that an error has occurred (don't scare them off with any technical information) and then close the application as gracefully as possible.
Apologies for this digression from the original question, but I hope you will find it useful.
Mike
_________________________________
Mike Lewis (Edinburgh, Scotland)
Visual FoxPro articles, tips and downloads