Hide controls on a form based on a timer

Posted on 2009-04-22
Last Modified: 2013-11-27
I have a form that when loaded has a couple of controls hidden until a button on a form is double clicked, then I set those controls .visible propert to true.  I need those .visible properties to revert back to false after a period of time say 1-2 minutes.  How can I make those controls hide again on a timer?  The data in those fields is credit card info and I don't want that data availble if a person walks away from their desk for any significant length of time.  I would prefer not to close the whole database, just hide the controls...
Question by:evel1959
    LVL 77

    Accepted Solution

    In the form_timer event procedure you would do:

    me.controlmnamehere.visible = false

    for each control.

    In the Form's Timer interval property set it to 60000 for 1 minute or 120000 for 2 minutes

    Author Closing Comment

    Thanks so much, it was much easier than I was expecting it to be.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
    When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
    In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
    In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now