Tags: access, database, form, inaccesss, microsoft, mouse, mousescroll, mysql, oracle, prevent, private, records, scroll, scrolling, sql, sub, user, wheel

prevent mouse wheel scrolling on a form

On Database » Microsoft Access

1,556 words with 1 Comments; publish: Mon, 26 May 2008 11:47:00 GMT; (250171.88, « »)

I am trying to prevent the user from using the mouse

scroll wheel to scroll through the records on a form in

Accesss 2003.

Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal

Count As Long)

If Page = True Then

DoCmd.GoToRecord , , acPrevious

End If

End Sub

If the page =true then you have moved to a new record so

the Docmd line should take you back to the previous

record you were on but it is not working.

Kindly help

Thanks

tim

All Comments

Leave a comment...

  • 1 Comments
    • You might want to have a look at MVP Stephen Lebans' downloadable example

      for controlling the mousewheel:

      http://www.lebans.com/mousewheelonoff.htm

      hth,

      Cheryl Fischer, MVP Microsoft Access

      Law/Sys Associates, Houston, TX

      "tim johnson" <anonymous.ms-access.todaysummary.com.discussions.microsoft.com> wrote in message

      news:1b08701c41fd1$a49a7b70$a401280a.ms-access.todaysummary.com.phx.gbl...

      > I am trying to prevent the user from using the mouse

      > scroll wheel to scroll through the records on a form in

      > Accesss 2003.

      > Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal

      > Count As Long)

      > If Page = True Then

      > DoCmd.GoToRecord , , acPrevious

      > End If

      > End Sub

      > If the page =true then you have moved to a new record so

      > the Docmd line should take you back to the previous

      > record you were on but it is not working.

      > Kindly help

      > Thanks

      > tim

      #1; Mon, 26 May 2008 11:48:00 GMT