Results 1 to 9 of 9
  1. #1
    New Lounger
    Join Date
    Feb 2003
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    trap out MS Mouse Wheel (Access2K Win2K)

    Situation: a form is set to cycle through current record. Tabbing behaviour is as expected, but if you spin the MS Mouse wheel you can (and will) create a new record in a form. How do you keep this from happening?

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: trap out MS Mouse Wheel (Access2K Win2K)

    What you could do is test for a Null in a field which should not be Null in the BeforeUpdate event of the form. If you find that the field is Null you simply set the variable Cancel equal to True. This will stop the writing of the record to the table.

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

    Re: trap out MS Mouse Wheel (Access2K Win2K)


  4. #4
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: trap out MS Mouse Wheel (Access2K Win2K)

    an API solution is what I had in mind but, unfortunately, I don't have Visual Studio to create the Wheel-trapping ActiveX control. are you aware of one already out there? I've often thought it odd that MS didn't bother to expose the Wheel method in Access properties as it's a common enough problem (or the wheel is common enough) and there's plenty of juystification to not want someone to create a new record if you've intentionally set cycle to Current Record.

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

    Re: trap out MS Mouse Wheel (Access2K Win2K)

    The second half of the MSKB article describes how to handle it completely within Access itself, without creating a DLL.

  6. #6
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: trap out MS Mouse Wheel (Access2K Win2K)

    yes, I noticed that, as well as a lot of warnings not to deploy the internal solution if there's any chance of the VBE window being opened. I don't anticipate doing and modules in the db at this time but would wait till final deployment before doing something that will cause the app to crash if the VBE window is ever opened.

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

    Re: trap out MS Mouse Wheel (Access2K Win2K)

    You can download MouseWheel.dll from http://www.worship.co.za/BlackandWhi...MouseWheel.htm.

  8. #8
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: trap out MS Mouse Wheel (Access2K Win2K)

    In Access 2002, forms have a MouseWheel property and a MouseWheel event. Wheel mice have only been the dominant form for the last few years and apparently no one ever considered what users might do with them in Access until recently.
    Charlotte

  9. #9
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: trap out MS Mouse Wheel (Access2K Win2K)

    thanks for the link! I'll try it out this weekend.

Posting Permissions

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