Posted By

erne100 on 08/28/10


Tagged


Versions (?)

Block Mouse Wheel in MSAccess 2003


 / Published in: Visual Basic
 

  1. Private bkmCurrentRecord as Variant
  2. Private timeWheel as Variant
  3.  
  4. Private Sub Form_Current()
  5. Dim tmpBookmark as Variant
  6.  
  7. If Timer - timeWheel < 1 Then 'If Wheel has been recently used
  8. If Not IsEmpty(bkmCurrentRecord) Then
  9. tmpBookmark = bkmCurrentRecord
  10. bkmCurrentRecord = Empty
  11. Me.Bookmark = tmpBookmark
  12. Else
  13. bkmCurrentRecord = Me.Bookmark
  14. End If
  15. Else
  16. bkmCurrentRecord = Me.Bookmark
  17. End If
  18. End Sub
  19.  
  20. Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal Count As Long)
  21. timeWheel = Timer
  22. End Sub
  23.  
  24. Private Sub Form_Open(Cancel As Integer)
  25. bkmCurrentRecord = Me.Bookmark
  26. End Sub

Report this snippet  

You need to login to post a comment.