Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Complicated Timer 1

Status
Not open for further replies.

ianbar

Technical User
Jan 10, 2003
69
GB
I have built my wizard interface (using the tab control)for completing a form. The wizard form is called when a new record is created, the wizard guides users through test proceedures and provides fields for the results to be entered. These results are then transferred into a results form (once all tests are complete).

My next problem is I need to have a message box appear after either 30 seconds or 10 minutes depending on the test. For instance the wizard will have a field for test 1 results and a start timer button. When the popup appears the users knows they should read the results from the test rig. Also the user may have switched application while waiting for the 10 minutes to expire so a beep would be useful. Sorry for the long post.
 
Instead of a message box you will need to create a form that looks like a message box.
Then you can open the form hidden and set its TimerInterval property to what you need:


This should be in the form where your tests are performed
If Test1 Then
varInterval = 10000 '10 seconds
Else
varInterval = 600000 '10 minutes
End If
DoCmd.OpenForm "YourHiddenForm", , , , , acHidden
Forms![YourHiddenForm].Form.TimerInterval = varInterval


This is the OnTimer event procedure for the 'message box' form

Private Sub Form_Timer()
Me.TimerInterval = 0
Beep
Me.Visible = true
End Sub


HTH


[pipe]
Daniel Vlas
Systems Consultant

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top