Solved

Ms Access: how to know, via VBA, if another user is using the database at the moment

Posted on 2010-11-17
4
375 Views
Last Modified: 2012-05-10
Hi,

Ms Access 2000/.../2010: how to know, via VBA, if another user is using the database at the moment?
How to know if the database is currently already open?
Thanks
somethink like that: if currentdb.alreadyopen then msgbox "yep"
0
Comment
Question by:bobdylan75
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 16

Expert Comment

by:HooKooDooKu
ID: 34154845
Try to open the database for "Exclusive Access".  If you fail to open the database, then someone else already has it open.
0
 
LVL 4

Accepted Solution

by:
Cristi_E earned 250 total points
ID: 34154852
Hi,
I think this will help:
http://support.microsoft.com/kb/198755

Cristi
0
 
LVL 75

Assisted Solution

by:DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 250 total points
ID: 34156809
Here are some links that will show you everyone who is logged in:

Here are some links:

How to determine who is logged on to a database by using Microsoft Jet UserRoster in Access 2000
http://support.microsoft.com/?id=198755

Who's logged in?
http://www.mvps.org/access/general/gen0034.htm

LDB Viewer Form
http://www.mvps.org/access/modules/mdl0055.htm

Also attached is an MDB that is sort of a combination of the above, that will load the logged in users into a table.

mx
WhoIsConnected.zip
0
 

Author Closing Comment

by:bobdylan75
ID: 34162644
thanks
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question