Results 1 to 6 of 6
  1. #1
    oriongate is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Jul 2011
    Posts
    7

    Button with timer. Help Needed please!

    Is it possible to make a button return to its up position by itself after a certain ammount of time is passed from another event (let's say after le form as not been touched for 5 minutes). Is there a code available on the net for it? Someone could Help me with it? I would Really Appreciate it!


    Thanks
    Oriongate

  2. #2
    GinaWhipp's Avatar
    GinaWhipp is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jul 2011
    Location
    Ohio, USA
    Posts
    377
    What type of button are you referring to? A toggle button? I'm trying to understand what the *up position* is...

  3. #3
    oriongate is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Jul 2011
    Posts
    7

    Clarifying my original post

    Hi GinaWhipp,

    I am referring to command buttons. I am not sure how it is named in the English version of Access 2003, but the action which I mentioned in my original post is called "Su tasto giu" in the italian version of the software. It is situated in the Events Tub.
    What I have is a database at work with a command button which unlocks all the fields in the form when it is clicked. The Command Button is located in a tab protected by a password. What I would like to do is to make the button be able to lock again all the fields by unclicking the button in automatic after the form has not been touche for five minutes.

    Thanks
    Oriongate

  4. #4
    GinaWhipp's Avatar
    GinaWhipp is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jul 2011
    Location
    Ohio, USA
    Posts
    377
    Okay, that is *much* clearer because *up position* did not make sense to me. Do you know how to apply a timer to a form? Because that is the I would handle that and the the code to lock the form.

    Hopefully, you can wait (or no one stops by in the meantime) till later when the Grandkids have left and I'll post some code that should work...

  5. #5
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    I'd like to mention a couple of things before you get involved in doing this. I would not really recommend this method because every time you hit a key on that form you would have to refresh your ending time which would slow down the performance of your form. Not to mention that having a timer running at all will slow down the performance of your form.

    If you're determined to do this you can check:

    http://support.microsoft.com/kb/128814

    for an example of checking for a timeout

  6. #6
    oriongate is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Jul 2011
    Posts
    7

    Giant Leap foerward but not there yet!

    Hi
    Thank you for your link rpeare! I have made a giant step forward in achieving my goal! I have inserted the example in my database and managed to make it do what it is supposed to. Unfortunately I am not good enougth with VB to change the example to do what I need.

    The Example:

    Sub IdleTimeDetected (ExpiredMinutes)
    Application.Quit acSaveYes
    End Sub

    I need To change the above portion of example so that instead cloasing the application after time expires, it will instead click Interruttore28 when it is active. The Click will deacttivate the interruttore 28 and lock all the fields situated on the form.

    I hope someone can help me to change the portion of the example to fit my database. I would really appreaciate it! Grazie

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Pause / Wait / Countdown / Timer
    By DevGreg in forum Programming
    Replies: 2
    Last Post: 07-19-2022, 06:30 AM
  2. Timer Event - Why does this happen
    By Rhino373 in forum Programming
    Replies: 2
    Last Post: 05-26-2011, 07:18 PM
  3. Timer routine in Access 2007
    By bcmarshall in forum Access
    Replies: 4
    Last Post: 04-25-2011, 04:23 PM
  4. Timer object
    By joki in forum Programming
    Replies: 7
    Last Post: 03-17-2011, 08:50 AM
  5. Closing the application with some timer
    By reachvali in forum Programming
    Replies: 1
    Last Post: 05-18-2010, 11:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums