Does anyone know how to get the number of users who are currently in an Access database using VBA? I know you can *manually* check the LDB file, but that's not what I'm after - I need the database to know how many users are in it.
I'm trying to find out because I'm writing a database for a group of people who, quite frankly, don't know how to use Access, and one of the problems their last system had was that it was extremely bloated, crashed easily, and even became corrupted because they NEVER compacted or repaired the database! So I'm trying to write some code that automatically performs these functions when the database is closed IF there is only one person in it (otherwise the database will give an error when it tries to compact/repair).
Believe me, I'd be the first person to admit that this isn't an ideal situation. But, I'm not the person who makes the decisions where I work - I'm just a temp who knows my way around Access and needs some cash and designes what the real IT guy tells me to, and it just so happens that the real IT guy wants it to be like this.
No problem!... it is OK, I believe in sharing knowledge.
What you can do is just import this form in your database and this would start working for your database... It works for shared dbs as well but put it on the backend database and not on the front end if you're using local copies of front end. If you're using a shared front end as well then you can import it to either of them.