G Gurpreet Jul 29, 2006 #1 how do i use timer control.... i am making an online examination system..... how can i set timer such that it quits after 2hrs.
how do i use timer control.... i am making an online examination system..... how can i set timer such that it quits after 2hrs.
P pietlinden Jul 29, 2006 #2 Gurpreet said: how do i use timer control.... i am making an online examination system..... how can i set timer such that it quits after 2hrs. Click to expand... dim dtTimeStop as date '---Access stores times as a fraction of a day... dtTimeStop = DateAdd("h",2,Now) in your timer control, you'd check for something like Sub MyForm_OnTimer() If dtTimeStop<=Now Then '---put your closing code here msgbox "Time's up", vbOKonly+vbinfo End if .... End Sub
Gurpreet said: how do i use timer control.... i am making an online examination system..... how can i set timer such that it quits after 2hrs. Click to expand... dim dtTimeStop as date '---Access stores times as a fraction of a day... dtTimeStop = DateAdd("h",2,Now) in your timer control, you'd check for something like Sub MyForm_OnTimer() If dtTimeStop<=Now Then '---put your closing code here msgbox "Time's up", vbOKonly+vbinfo End if .... End Sub