Page 1 of 2 12 LastLast
Results 1 to 15 of 26
  1. #1
    Miles R is offline Competent Performer
    Windows 11 Office 365
    Join Date
    Mar 2019
    Posts
    280

    MouseWheel Event stopped working properly

    A worrying problem has just occurred in my Access Databases with the mouse wheel events.

    Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal Count As Long)
    End Sub

    Whether I roll the Mouse Wheel backwards or forwards, Count is always zero. It is supposed to be positive if rolled backwards.
    It was working a few days ago.
    I have tried this on other databases that use the Form_MouseWheel event and they all have the same problem.
    It is not the Mouse, as I swapped it to one that is working on a Windows 10 machine.
    Also, I tested the mouse functions using an online App and it recognised both forward and backward roll.
    Plus, when scrolling a long form that has a standard Windows Scroll bar, it works perfectly well, both forward and backward. It also scrolls up and down in word and excel files using the mouse wheel. And I can scroll up and down this page.



    It just seems to be the Form_MouseWheel event that has gone wrong.

    I have done a reboot and a Repair of Office 365 to no avail.

    Anyone got any ideas?

  2. #2
    Miles R is offline Competent Performer
    Windows 11 Office 365
    Join Date
    Mar 2019
    Posts
    280
    After googling, I see someone else reported this problem on 24th December 2024.
    I have version :-
    Microsoft® Access® for Microsoft 365 MSO (Version 2412 Build 16.0.18324.20092) 64-bit
    and in the update history, it gives the release notes for Version 2412: January 07
    This would be about the right time frame, so it looks like 2412 has introduced a bug (hope its not an intentional feature).

    Until this is fixed, I'll look at other ways to get the Roll direction - probably from a DLL.

  3. #3
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    I have Beta version 2502 build 18502.20000 and can confirm that although scrolling still works, the mouse wheel line count is no longer working (Count always zero)

    Just re-tested in A2010 where the count is positive when scrolling downwards & negative when scrolling upwards.

    I did see an earlier report last month but have no idea whether its already been reported.
    Do you have a link for the earlier report?

    I'll inform the Access team tomorrow
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  4. #4
    Miles R is offline Competent Performer
    Windows 11 Office 365
    Join Date
    Mar 2019
    Posts
    280
    Thanks for the reply isladogs.
    The previous report was
    MouseWheel event no longer working - Microsoft Community

    I am trying to find a function similar to "Public Declare PtrSafe Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long"to get the Mouse Roll direction but not found anything yet. I'm sure there must be one - don't want to have to write some complicated Class stuff.

  5. #5
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    Thanks. Yes I remember that earlier report now but didn't follow up at the time.

    I've just reported this to the Access team who will hopefully follow up on Monday. I've added links to both threads

    In the meantime, if it significantly affects your workflow, I would suggest rolling back to version 2411.
    I've had a quick attempt to fake the effect using other form/report events but with no luck.

    I'm not aware of an obvious API solution though you might find something for 32-bit Access that you can adapt on Stephen Lebans website: https://lebans.com/

    Or possibly this code might get you started? https://extramiledata.com/scroll-mic...g-mouse-wheel/
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  6. #6
    Miles R is offline Competent Performer
    Windows 11 Office 365
    Join Date
    Mar 2019
    Posts
    280
    Colin,
    Thanks for following this up and reporting it. Hopefully it will be regarded as a bug that needs fixing.
    Until then I have found some ways of getting round the issue by replicating Mouse Roll with the Page Up and Page Down Keys on forms.
    This does not work on Textboxes though. I have some that have variable length text, sometimes it may be a few lines and sometimes enough that it needs a scroll bar.
    Previously I was replicating the scroll using SendKeys. These don't seem to work any more for scrolling.

    I am currently looking at other ways of detecting MouseWheel movement and how to replicate scroll movement, possibly by SendMessage or other ideas in the lebans.com files.

    These projects are for my own use, so not business critical, but it would be a major inconvenience if this is not fixed and probably a redesign of some forms, particularly the textboxes.

    I would have thought that a lot of business users would be complaining about this, but maybe no one uses scroll bars on forms and text boxes anymore.

  7. #7
    Miles R is offline Competent Performer
    Windows 11 Office 365
    Join Date
    Mar 2019
    Posts
    280
    Actually, for the moment, I think I'll just stop using the Mouse Wheel for scrolling on Forms and Text Boxes. The scrolling in Text Boxes does work if I just drag the scroll bar up and down.

    I seem to remember from a previous post Force Textbox Scrollbars Visible - Microsoft: Access Other topics | Tek-Tips
    that the scroll bar only appeared if the focus was on the text box. I used to have that problem. It does not seem to be the case now, so if a scroll bar is needed, it appears whether the text box has focus or not.
    Maybe that issue was fixed some time ago.

  8. #8
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    I have the latest version of Access.

    AFAIAA, there has been no recent change in behaviour with textbox scrollbars which only appear when the textbox has focus.
    I can scroll in a textbox using the mouse wheel or by dragging the scrollbar

    You may find this very old example app useful. For 32-bit Access it uses the old MouseHook.dll

    TextboxScroll.zip
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  9. #9
    Miles R is offline Competent Performer
    Windows 11 Office 365
    Join Date
    Mar 2019
    Posts
    280
    Colin,

    Thanks for your reply. My textboxes have Rich Text and Mouse Wheel scrolling only seems to work Down. When I change to Plain Text scrolling works properly in both directions.
    Maybe this problem only affects Rich Text boxes.

    Also, I can definitely see the Scroll Bar when I open up another form (and presumably the text box no longer has focus). Maybe the got focus bit only applies when still on the same form.

    I tried the example you sent and it does work, but I think they are also Plain Text boxes.

  10. #10
    Miles R is offline Competent Performer
    Windows 11 Office 365
    Join Date
    Mar 2019
    Posts
    280
    Colin,

    I changed your example to a Rich Text box and mouse wheel scrolling no longer works.
    I think this is where the SendKeys were needed to get scrolling to work in Rich Text boxes - does not work in this latest Access version 2412. They are clearly not needed in Plain Text boxes.

  11. #11
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    Hi Miles
    I've had an initial response from the Access team who have stated this issue isn't the result of a deliberate change
    Also that it will be investigated properly next week.

    The OP in the original report at MS Answers confirmed that rolling back solved the issue for now.
    There has since been a third report, also at MS Answers of this mousewheel event issue.

    I can confirm that mouse scrolling doesn't work at all (in either direction) in rich text boxes and have now reported this as well.
    I would never recommend using SendKeys as a solution as it is notorious for being affected by version related changes.

    I can also replicate that if a textbox scrollbar is visible, it remains so when another form is opened and gains focus.
    However, clicking elsewhere on the form with the scrollbar, removes that again.
    I don't see that as an issue that needs reporting.
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  12. #12
    Miles R is offline Competent Performer
    Windows 11 Office 365
    Join Date
    Mar 2019
    Posts
    280
    Colin,

    Thanks for the reply. Great news that it is not deliberate and will be properly investigated.
    Maybe if they fix it for Rich Text boxes, the SendKeys will not be needed. I have read that SendKeys is not a good idea, but I've been using that successfully for many years in Rich Text boxes without problem and it is such a simple implementation.

    On the focus issue, I agree this is not a problem at least for me, as I don't have two text boxes on the same form with scroll bars.

  13. #13
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    I've had further communication with the A-team and have sent them a repro database at their request

    They have also confirmed the issue with scrolling in rich textboxes in A365.
    In that respect, its one better than A2010 where mousewheel scrolling didn't work in plain or rich text boxes!
    Anyway, that issue has also been noted!
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  14. #14
    Miles R is offline Competent Performer
    Windows 11 Office 365
    Join Date
    Mar 2019
    Posts
    280
    Quote Originally Posted by isladogs View Post
    I've had further communication with the A-team and have sent them a repro database at their request

    They have also confirmed the issue with scrolling in rich textboxes in A365.
    In that respect, its one better than A2010 where mousewheel scrolling didn't work in plain or rich text boxes!
    Anyway, that issue has also been noted!
    Colin, Not sure about that. I've just tested 32 bit Access on my Windows 10 machine and Mouse Wheel scrolling does work in plain text boxes but not in rich text boxes - just like Windows 11 - even Access 2412.
    This is where I added SendKeys to the MouseWheel event, probably 10 years ago, to get Mouse Wheel scrolling to work in Rich Text boxes. Still works on Windows 10 and Windows 11 prior to update 2412.

  15. #15
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    I was referring to Access 2010 in my last reply.
    For what it’s worth , I’m still using Windows 10 as I have never upgraded to Windows 11
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 01-22-2018, 12:40 PM
  2. Replies: 4
    Last Post: 10-12-2015, 12:16 PM
  3. Mousewheel Scroll Problems
    By n1nj4m4st3r in forum Access
    Replies: 4
    Last Post: 02-14-2014, 12:37 PM
  4. NotInlist Event not working properly
    By thanosgr in forum Programming
    Replies: 2
    Last Post: 06-14-2012, 01:46 PM
  5. Mousewheel dll technique
    By pkstormy in forum Code Repository
    Replies: 0
    Last Post: 08-24-2010, 04:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums