Results 1 to 10 of 10
  1. #1
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Turning off redorn selection via mouse scrollwheel (Access 2000)

    You can download a free DLL from MouseWheelOnOff. The DLL lets you control the behavior of the mouse wheel in your forms. There are instructions on the site, and the download comes with a sample database.

  2. #2
    2 Star Lounger
    Join Date
    Nov 2004
    Location
    Lexington Park, Maryland, USA
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Turn off record selection via scrollwheel (Ac2000)

    I have turned off the record selectors for some forms in Access. I also have only one record being shown in each form. The problem is that when the form is open and the mouse is held over the form, the scroll wheel will create a new record if it is scrolled up. How do I turn this off?

    Mike

  3. #3
    2 Star Lounger
    Join Date
    Nov 2004
    Location
    Lexington Park, Maryland, USA
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Turning off redorn selection via mouse scrollwheel (Access 2000)

    Do I need to use the ActiveX DLL based method because I am using Access 2000? I tried the MouseWheelHook and that did not work. Any suggestions?

    Mike

  4. #4
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Turning off redorn selection via mouse scrollwheel (Access 2000)

    I just set the AllowAdditions property of the form to No.

    You then have to handle adding records with code.
    Regards
    John



  5. #5
    2 Star Lounger
    Join Date
    Nov 2004
    Location
    Lexington Park, Maryland, USA
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Turning off redorn selection via mouse scrollwheel (Access 2000)

    Correction. I did get this to work. It works great.

    Thanks Hans,
    Mike

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Turning off redorn selection via mouse scrollwheel (Access 2000)

    The newer version should work on Access 2000. You must copy the Mousehook.dll file to the same folder as your database, or to your system folder (C:WindowsSystem32 or something similar). Does the demo database from the download work for you if you put the dll in the same folder?

  7. #7
    2 Star Lounger
    Join Date
    Nov 2004
    Location
    Lexington Park, Maryland, USA
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Turning off redorn selection via mouse scrollwheel (Access 2000)

    Thanks John. That is even easier.

    Mike

  8. #8
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Turning off redorn selection via mouse scrollwheel (Access 2000)

    Hi John,

    I'm just jumping in here to try and skin the same cat in a different way.

    Firstly, the Kill the MouseWheel routine works perfectly.

    However, if I wanted to maintain the use of the MouseWheel, it will, as you know, just go wheeling right of the end of the file and go for a "New" record, and that is not a good thing.

    What I tried was to turn the AllowAdditions to "No" which immediately quashed any Mousey desire to go off the deep end. You alluded to the adding a new record programmatically, but when I did this using the standard:

    Private Sub Command56_Click()
    On Error GoTo Err_Command56_Click
    DoCmd.GoToRecord , , acNewRec
    Exit_Command56_Click:
    Exit Sub
    Err_Command56_Click:
    MsgBox Err.Description
    Resume Exit_Command56_Click
    End Sub

    I got the "You can't go to the specified record" message.

    Is there any way that I can selfishly have the best of both worlds, ie. go wheeling about, but still via a button, add a new record? Thanks in advance for any observations on this,
    Cheers,
    Andy

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Turning off redorn selection via mouse scrollwheel (Access 2000)

    You can set

    Me.AllowAdditions = True

    just before the line that goes to a new record. You must set it to false again in two form events:

    Private Sub Form_AfterInsert()
    Me.AllowAdditions = False
    End Sub

    Private Sub Form_Current()
    If Me.NewRecord = False Then
    Me.AllowAdditions = False
    End If
    End Sub

    The first resets AllowAdditions after a new record has been inserted, the second when the user moves back to an existing record without having created a new record.

  10. #10
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Turning off redorn selection via mouse scrollwheel (Access 2000)

    Hans,

    Neat!

    Thanks muchly,
    Cheers,
    Andy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •