Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2010

    Unanswered: Database Timeout

    Hey Guys.

    I have a form and table based login system implemented into my database.
    The user is presented a menu to which they pick their user privileges (they enter as either a Administrator or a User; both require login).

    I'd like to be able to use a timeout feature within my database that upon User entry; locks the user out after 30 minutes of use unless they tick the "Remember Me" box within the Login form. The timeout feature wouldn't apply to the Administrator though.

    I'm not sure how I'd go about doing this as the timeout feature need only apply to the Users who have not opted for the database to keep them logged in.

    Help would be appreciated guys, so thanks in advance

  2. #2
    Join Date
    Mar 2009
    Provided Answers: 15
    You could use a hidden form with a Timer set on with a TimerInterval with the desired value and some code in the OnTimer event that would perform any action needed to "lock the user out", whatever you mean by this.

    This form would be conditionally opened from the login form, depending on the "Remember me" check box and the login ID (for the case of the Administrator).
    Have a nice day!

  3. #3
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    hidden form on a timer
    allow that hidden form to reset the timer each time you do soemthing (say each forms on current event). in that event you reset the timer, or reset its last used varaible
    I'd rather be riding on the Tiger 800 or the Norton

  4. #4
    Join Date
    Dec 2004
    Madison, WI
    I usually set a variable (ie. Dim FormIsActive as boolean) under the form's Option Explicit. When the form opens, I initially set that variable to true. If a user does something on the form, that variable then sets to true (ie. AfterUpdate or another event of the form). Then in the form's timer event, I check to see if FormIsActive is true or false. If it's false, the form then locks and a password must be entered to re-allow editing, otherwise I'll set it to false. You could do something similar with your situation (but changing the circumstances of setting it true/false with a password).
    Last edited by pkstormy; 04-05-10 at 23:10.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

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