MS Access Version 2412 Build - VBA to override default form record scrolling behavior no longer works

Anonymous
2025-01-13T22:49:52+00:00

I have several continuous and single forms and use the following code to override the default record scrolling behavior. With the January 7 MS Office update, nad update to Access Version 2412, the following mouse wheel event code no longer works.

What changed in Version 2412?

I've also tried changing it to DoCmd.GoToRecord , , acPrevious etc. but the default record scrolling behavior in forms is what persists.

On Error GoTo Err_Handler

    'Purpose:   Make the MouseWheel scroll in Form View in Access 2007 and later.

    '           This code lets Access 2007 behave like older versions.

    'Return:    1 if moved forward a record, -1 if moved back a record, 0 if not moved.

    'Author:    Allen Browne, February 2007.

    'Usage:     In the MouseWheel event procedure of the form:

    '               Call DoMouseWheel(Me, Count)

    Dim strMsg As String

    'Run this only in Access 2007 and later, and only in Form view.

    If (Val(SysCmd(acSysCmdAccessVer)) >= 12#) And (frm.CurrentView = 1) And (lngCount <> 0&) Then

        'Save any edits before moving record.

        RunCommand acCmdSaveRecord

        'Move back a record if Count is negative, otherwise forward.

        RunCommand IIf(lngCount < 0&, acCmdRecordsGoToPrevious, acCmdRecordsGoToNext)

        DoMouseWheel = Sgn(lngCount)

'        If lngCount < 0& Then

'            DoCmd.GoToRecord , , acPrevious

'        Else

'            DoCmd.GoToRecord , , acNext

'        End If

    End If

Exit_Handler:

    Exit Function

Err_Handler:

    Select Case Err.Number

    Case 2046&                 'Can't move before first, after last, etc.

        Beep

    Case 3314&, 2101&, 2115&   'Can't save the current record.

        strMsg = "Cannot scroll to another record, as this one can't be saved."

        MsgBox strMsg, vbInformation, "Cannot scroll"

    Case Else

        strMsg = "Error " & Err.Number & ": " & Err.Description

        MsgBox strMsg, vbInformation, "Cannot scroll"

    End Select

    Resume Exit_Handler

End Function
Microsoft 365 and Office | Access | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Anonymous
    2025-01-15T01:44:59+00:00

    The Access team have been able to replicate the Count bug with the repro database I sent them and have confirmed that it will be fixed.

    Although not mentioned in this thread, I cannot see how the Page argument would ever be true.

    3 people found this answer helpful.
    0 comments No comments
Answer accepted by question author
  1. Anonymous
    2025-01-22T23:49:31+00:00

    News from the Access team

    The mouse wheel issue will be fixed in version 2501, which will be available next week (W/C 27 Jan)

    My related article on the Access Forever blog site will be updated again when the release date and build number are known

    The Beta Channel should be fixed at around the same time

    1 person found this answer helpful.
    0 comments No comments

11 additional answers

Sort by: Most helpful
  1. Anonymous
    2025-01-13T23:44:03+00:00

    Yep, a bug in version 2412, refer to:

    https://www.devhut.net/potential-mousewheel-bug-in-microsoft-365-version-2412/

    and

    https://www.youtube.com/watch?v=WdAdbHJiFCU

    That's all the information that is available at this time.

    2 people found this answer helpful.
    0 comments No comments
  2. George Hepworth 22,115 Reputation points Volunteer Moderator
    2025-01-13T23:46:24+00:00

    This bug has been reported to the MS Access team.

    You can roll back the update. Others have reported that resolves the bug.

    0 comments No comments
  3. Anonymous
    2025-01-14T14:15:53+00:00

    Thank you!

    0 comments No comments