Force Users to log out.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Andy_Khosravi@bcbsmn.com

    Force Users to log out.

    I have a method in place in my application to force users out. It's a
    simple tactic I got from these newsgroups where you create a table
    with one record called logout, then check that field with a timer on a
    form that doesn't close. If it's checked, it starts a forced logout
    sequence.

    Works fine 99% of the time (unless somebody is in the middle of a
    record update and walks away from their computer for several hours,
    but that's a different problem). My only real problem with it is when
    the database becomes corrupted. Ever since I converted to A03 from A97
    and split the database, I've been getting a lot of corruption
    (absolutely zero corruption problems with A97 and monolithic DB
    structure, again different problem). Anyway, when the DB becomes
    corrupted, I cannot even open the database without getting the
    'unrecognized DB format, file is corrupted, do you wish to repair it
    now?' window that you can't get around, and which does no good because
    you can't repair while people are logged in.

    I have LDBView, and can use that to help track down 1 or 2 people with
    the grudging aid of my helpdesk, but when its 20 people in different
    buildings all over the state that is not really practical. The people
    who are still logged in when the corruption occurs can use the DB with
    no trouble, so I've got to believe there is a way to update that
    logout table and force people out.

    Anybody know of a way to force a record update to that logout table
    without actually being in the corrupted DB itself?
  • Andy_Khosravi@bcbsmn.com

    #2
    Re: Force Users to log out.

    I've been thinking about it, and I wonder if it would be better to
    reference an external txt file or something rather than an internal
    table. Now the question is, how do I write the code to check a simple
    external text file. I suppose I can concoct something up on my own.



    Comment

    • ARC

      #3
      Re: Force Users to log out.

      In your close routine, couldn't you just call a docmd.runcomman d
      acCmdSaveRecord prior to closing out the application?

      Or you could write a function in the middle of the close routine that closes
      all open forms with the saveyes command. If you need details on this, let me
      know.

      Good luck!

      Andy
      <Andy_Khosravi@ bcbsmn.comwrote in message
      news:c3c8a115-1a96-4be8-a604-6b943b8dd161@s8 g2000prg.google groups.com...
      I've been thinking about it, and I wonder if it would be better to
      reference an external txt file or something rather than an internal
      table. Now the question is, how do I write the code to check a simple
      external text file. I suppose I can concoct something up on my own.
      >
      >
      >

      Comment

      • Tony Toews [MVP]

        #4
        Re: Force Users to log out.

        Andy_Khosravi@b cbsmn.com wrote:
        >I've been thinking about it, and I wonder if it would be better to
        >reference an external txt file or something rather than an internal
        >table.
        Yes, that's always been my thoughts on this topic.
        >Now the question is, how do I write the code to check a simple
        >external text file. I suppose I can concoct something up on my own.
        This could be as simple as looking for the presence of a specific file in the same
        folder as the backend. Take a text file, call it something like Corruptions read
        me.txt. Put some text inside stating rename the file to something like
        DepartNow.txt.

        Then in that same timer event just do a dir.

        Tony

        --
        Tony Toews, Microsoft Access MVP
        Please respond only in the newsgroups so that others can
        read the entire thread of messages.
        Microsoft Access Links, Hints, Tips & Accounting Systems at

        Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/

        Comment

        Working...