Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2004
    Posts
    10

    Unanswered: Number of users in the database

    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).

    I'm using Access 2003. Thanks!

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Woah there sparky...

    1. You have users who do not know how Access works.
    2. You are allowing the users to make code alterations that result in corruption.
    3. See 1 and 2.
    4. See the problem with 3?

    I would be more concerned with allowing my users to have the ability to hose my database then I would with automating recovery.




    Anyways, what sort of db architecture are you using? Is it a split db or a shared mdb? neither?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Jun 2004
    Posts
    10
    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.

    Anyway, it's a shared MDB.

  4. #4
    Join Date
    Jan 2004
    Location
    Islamabad, Pakistan
    Posts
    97
    Here is the access 97 db which uses a form that can tell you who is logged on to your database and from which computer..., See if the same works in Acces 2K3

    - Saqib
    Attached Files Attached Files

  5. #5
    Join Date
    Jul 2004
    Posts
    8

    Message to Saqib

    Hello Saqib

    Hope you don't mind but I've taken a copy of your whoislogged on form.

    The only problem is I'm completely ignorant of how to edit it to make it work on my own database.

    The database is split and I'm unsure where to edit the code to insert the name, path etc of my database.

    Thanks in advance

    Richard

  6. #6
    Join Date
    Jan 2004
    Location
    Islamabad, Pakistan
    Posts
    97
    Hi Richard!...

    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.

    - Saqib

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •