Can you not just set a global variable the first time the code fires (or,
better yet, write a value to a table or to the form), and bypass the code if
it's already been run?
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, _
X As Single, Y As Single)
Static dtTheTime As Date
'If more than 10 seconds have elapsed since last mouse move
If DateDiff("s", dtTheTime, Time()) > 10 Then
'Do stuff
dtTheTime = Time()
Else
'do Nothing or do something else
End If
End Sub
John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
Good idea, John, assuming the OP wants the mouse reactivated after a period.
I wasn't thinking along those lines: I thought that once the first mouse
move was detected, they didn't want it active again.
Can you not just set a global variable the first time the code fires (or,
better yet, write a value to a table or to the form), and bypass the code if
it's already been run?
--
Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
(no e-mails, please!)
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.