Gregg,
Thanks a lot for this notification. This particular form is based on a class which doesn't have code in Error method. (We will use our Error Handler instead). Anyway, it's important to know. Thanks.
>Just an aside....
>
>This trick in testing a local error is a pretty standard thing to do. But I believe that it won't work if you run this from within a class that has code in it's Error() method. The class' Error() method will run regardless. I just thought I'd mention it because you could get some suprising results.....
>
>Gregg
>
>>Is there any function that can check a FoxPro .DBF is used by user shared or exclusively?
>>
>>Hi Daniel,
>>
>>This is the code I use (thanks Mike Helland for the idea).
>>
>>local lcSaveError
>>lcSaveError=on('error')
>>on error
>>use DataDict alias DataDict in 0 exclusive
>>if !used('DataDict') && Could not be opened exclusively
>> =messagebox('DataDict table is already opened by another user',48,'Cancel...')
>> on error &lcSaveError
>> return .f.
>>endif
If it's not broken, fix it until it is.
My Blog