Pause a form that's on a timer?

C

CW

Using the timer event, I have a form that is displayed on Startup of our
database for 5 seconds only (current sales figures for the month) because
that's long enough for most users.
However, some people want it to be able to see it for longer, to study the
figures better (the salespeople, so that they can see how their commission is
stacking up!).
Could I have a "Pause" button that would temporarily put the form on hold,
so that it would remain visible until the button was clicked again (or until
another button "Continue" was clicked) allowing the timer to continue in its
normal way?
Many thanks
CW
 
J

Jeff Boyce

One approach might be to have a button that sets the timer interal to 0 ...
I believe that "cancels" the timer. Then you could reset the timer interval
to a very short interval (or forget about the timer and just go to the next
form).

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
K

Klatuu

So happens I have a form where I do exactly that. I have the Timer Interval
set to 100 in the Properties Dialog.

Private Sub cmdTimer_Click()

With Me.cmdTimer
If .Caption = "Pause" Then
.Caption = "Continue"
Me.TimerInterval = 0
Else
.Caption = "Pause"
Me.TimerInterval = 100
End If
End With
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top