I'd like to know how to check if a table is in use by another user or process. I've searched the forums but couldn't really find what I needed.
Anyone with a suggestion or references to 'how to' articles please help.
Try to open the table in Design View. If it fails, the table is probably locked by another user. (This will work even if the table is being displayed in a form with optimistic locking, for example.)
Rick Sprague
Want the best answers? See faq181-2886 To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
Until microsoft is forced to publish its API's I honestly don't think there's any way to test for this.
Trying to open a table in Design View will fail on:
Security
Linked
MDE
I spent a bit of time on this earlier. For once I thought I'd beat you to an answer RickSpr, so often I work on an question, when I'm ready, I do a quick Refresh, who's there before me, RickSpr.
Thanks for catching my gaffe. I knew there were some other reasons opening in Design View could fail (that's why I said "probably", but I didn't stop to think how common they might be.
That "getting there before me" works both ways, you know. I'll bet we have very similar habits in how we browse the forums.
I still haven't succeeded in knocking you out of the top slot in the Experts list though, have I? :-D
Rick Sprague
Want the best answers? See faq181-2886 To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
Thank you both for your response. Decided I won't use this because the db is split and secured. I will just let it bounce on a general err.description,
or otherwise do have to force Microsoft myself.
Since this is a forum: can anyone tell me how this can be done in vba?
May the best man get there first.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.