how to set the database time to timer control

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sri nandhini
    New Member
    • Dec 2010
    • 1

    #1

    how to set the database time to timer control

    hi sir,
    here am doing one small project using VB with Access,
    my title is Offline examiner.
    in my project i created one form entitled attend exam
    in this form am using timer control, and i wanna set particular time from the current time.(ex: 45min per exam).. that timing is differed for each exam. that timing allocation stored in database. now whats the confusion is how could i set that database timing to timer control..

    pls help me.
  • ADezii
    Recognized Expert Expert
    • Apr 2006
    • 8834

    #2
    You would transfer the desired number of Minutes into the Timer Control by setting its TimerInterval Property, keeping in mind that this Property is defined in MilliSeconds, and not Seconds. After the specified Time Interval, Code in the Form's Timer() Event will be executed. To set the Form's Timer for 45 Minutes:
    Code:
    Const conMILLIs_IN_MIN As Long = 60000
    
    Me.TimerInterval = (45 * conMILLIs_IN_MIN)
    
    '**************************
    'To Disable the Timer
    'Me.TimerInterval = 0
    '**************************

    Comment

    Working...