Access 2003:
I have a situation where the user clicks an "up arrow" Command Button in order to re-order records. I want to allow the user to "click and hold" this button to prevent sometimes having to click many times. The software should halt for a second and then simulate rapid fire clicking. The natural choice seems to me to be the Timer function built into the Form.
So I have:
I can not get the Timer Event to start firing until after I release the mouse button (If I comment out the Me.TimerInterval = 0 in the MouseUp event). I can put a few "Promote_Click" calls directly in the MouseDown event and it works fine while still holding the mouse button.
Does anyone know why I can't get the Timer Event to fire while holding the mouse button down?
This may or may not be part of the same problem but...
Say I get the timer firing by leaving the code the same as above but removing the MouseUp event. Now, if I click and hold the mouse anywhere on the form, the timer event ceases to fire.
Any Ideas how to get around this or what causes it?
Thanks!
I have a situation where the user clicks an "up arrow" Command Button in order to re-order records. I want to allow the user to "click and hold" this button to prevent sometimes having to click many times. The software should halt for a second and then simulate rapid fire clicking. The natural choice seems to me to be the Timer function built into the Form.
So I have:
Code:
Private Sub Promote_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.TimerInterval = 1000
End Sub
Private Sub Promote_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.TimerInterval = 0
End Sub
Private Sub Form_Timer()
Me.TimerInterval = 200
Call Promote_Click
End Sub
Does anyone know why I can't get the Timer Event to fire while holding the mouse button down?
This may or may not be part of the same problem but...
Say I get the timer firing by leaving the code the same as above but removing the MouseUp event. Now, if I click and hold the mouse anywhere on the form, the timer event ceases to fire.
Any Ideas how to get around this or what causes it?
Thanks!