Fundamentally, I'm not sure there is any other way to do it. If you call some IsItLocked() function and it returns False, by the time you try to open the file someone else may have locked it. You either get the lock or you don't.
>Hilmar,
>
>I've been looking through the help and this does indeed appear to be the way it should be done. :( I'm not too crazy about this solution, but I guess I'll use it.
>
>Thanks,
>Chad
>
>>I assume that if the file is used somewhere else, the code to open it would produce an error. A simple solution might then be to use a try - catch block.
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up