Although the last post, which references code to report network user connections, is helpful, the only definitive way of solving your problem is as follows ... and its simple.
Open up your Access database in exclusive mode. If you successfully open it up in exclusive mode, you can safely perform your database work knowing that noone else can gain access to it. If someone else is in, you'll be informed that an exclusive access attempt is not possible.
You might want to use the tool mentioned in the previous post to identify who might be preventing you from getting exclusive access, but, the key is getting exclusive access.