Results 1 to 10 of 10
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    USA
    Posts
    386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Loging Out (Access 2000/2003)

    Is there a way using code to force anyone who has a database open to close the database, thenreturn to the administrator
    the ID of anyone who had the database open?


    Thanks
    Richard

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Loging Out (Access 2000/2003)

    See for example How to shut down a custom Access application remotely and Auto Logout Users for DB Maintenance. Both will throw out active users, but won't return their usernames, though.

  3. #3
    2 Star Lounger
    Join Date
    May 2002
    Location
    Jerusalem, Israel
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Loging Out (Access 2000/2003)

    Hi. I am also trying to implement this auto-logout feature in my Access 2000 DB. It works great for my front end, but doesn't seem to log other users out of the DB. Any ideas as to why? What is it that I'm missing?

    I put the forms on the FE and linked them to the table on the BE.

    Thanks for your help.

    JoeK

  4. #4
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Loging Out (Access 2000/2003)

    So each user has their own copy of the FE, and the FEs are all the same, and all include an autologout feature.

    It works for you, but not for other users?

    Which of the two options that Hans linked to did you use?
    Regards
    John



  5. #5
    2 Star Lounger
    Join Date
    May 2002
    Location
    Jerusalem, Israel
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Loging Out (Access 2000/2003)

    Yes, that's right. I used Hans' second option.

  6. #6
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Loging Out (Access 2000/2003)

    Do the other users see the form "frmLogoutStatus" at all?

    Does you startup form open "frmLogouttimer" hidden?
    Regards
    John



  7. #7
    2 Star Lounger
    Join Date
    May 2002
    Location
    Jerusalem, Israel
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Loging Out (Access 2000/2003)

    Do the other users see the form "frmLogoutStatus" at all? No, it doesn't come up on their screen.

    Does you startup form open "frmLogouttimer" hidden? I'm not sure what you mean by a startup form. Do you mean the initial view when you open the database or do you mean the form where you have to check the checkbox to start the auto logoff procedure? In any case, it is still visible when you open the form to start the auto logoff procedure.

  8. #8
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Loging Out (Access 2000/2003)

    A startup form is a form that is opened automatically whenever the database is opened.

    This method requires that the form "frmLogouttimer" be open (but hidden) at all times to keep checking whether the user is supposed to be logged out.
    In the Demo, the startup form is "frmDemo".
    In its Open event it has two lines of code that open form "frmLogoutTimer" , but one has been commented out.

    You want to keep oCmd.OpenForm "frmLogoutTimer", , , , , acHidden in the Open event of your startup form.

    Presumably you only want some people (maybe just you) to be able to log other users out of the database. So a form with triggers the log out, like frmDemo does, should be hidden from most users. This would not be the startup form of your real database.
    Regards
    John



  9. #9
    2 Star Lounger
    Join Date
    May 2002
    Location
    Jerusalem, Israel
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Loging Out (Access 2000/2003)

    Ah! Works! Thanks for your help.

    It all seems so simple now!

    Regards,

    JoeK

  10. #10
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Loging Out (Access 2000/2003)

    I am putting this into one of my dbs.

    This method stores a logout flag in a table. The problem I see is that the logout flag is left in the table when everyone has logged out, so someone has to clear it when they next log in.

    It should be possible to have this flag cleared automatically when the last user logs out.

    I found a post pointing me to How to determine who is logged on to a database by using Microsoft Jet UserRoster

    When I run this, I find I am listed three times, but I am only using one copy of the db. But this functions looks at connections to the backend. Do I have 3 connections to the backend?
    Attached Images Attached Images
    Regards
    John



Posting Permissions

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