?
Solved

Timer event disabled after Break

Posted on 2006-05-04
4
Medium Priority
?
216 Views
Last Modified: 2008-03-03
If you break (hit Cntl+Break) in the middle of a Form Timer event procedure and Select 'End', the timer event will no longer fire until you close and reopen the form. This is unexpected to me. Can anyone explain why this happens and how to prevent it (ie how to automatically reactivate the timer).
0
Comment
Question by:Milewskp
  • 2
  • 2
4 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 16608289
from VBA help

Timer Function Example
This example uses the Timer function to pause the application. The example also uses DoEvents to yield to other processes during the pause.

Dim PauseTime, Start, Finish, TotalTime
If (MsgBox("Press Yes to pause for 5 seconds", 4)) = vbYes Then
    PauseTime = 5    ' Set duration.
    Start = Timer    ' Set start time.
    Do While Timer < Start + PauseTime
        DoEvents    ' Yield to other processes.
    Loop
    Finish = Timer    ' Set end time.
    TotalTime = Finish - Start    ' Calculate total time.
    MsgBox "Paused for " & TotalTime & " seconds"
Else
    End
End If

0
 
LVL 1

Author Comment

by:Milewskp
ID: 16608339
Hi Cap,
I'm talking about the Timer event forforms, not the Timer function.
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 total points
ID: 16608398
<the timer event will no longer fire until you close and reopen the form.>

the timer event for the form is most likely called in the open or load event of the form
0
 
LVL 1

Author Comment

by:Milewskp
ID: 16764624
Thanks cap - full points to you.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Suggested Courses

750 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