1. Open the form in design view.
2. Open the Properties box (View menu.
3. On the Events tab, set the Mouse Wheel property to:
[Event Procedure]
4. Click the Build button (...) beside the property.
Access opens the code window.
Set up the code there as shown.
If you don't see the property, you are looking at the properties of a text
box where you need to be looking at the properties of the form.
David R said:
Thanks Allen. I am still a little new at this. How do I add this code?
David
:
If you want the scroll wheel to move record in Form View as it did in
previous versions of Access, use the MouseWheel event like this:
Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal Count As Long)
On Error GoTo Err_Handler
'Purpose: Make the MouseWheel in Access 2007 scroll in Form view
like
previous versions.
'Only in Access 2007 and later, and only in Form view.
If (Val(SysCmd(acSysCmdAccessVer)) >= 12) And (Me.CurrentView = 1)
Then
'Save any edits before moving record.
If Me.Dirty Then
Me.Dirty = False
End If
'Move back a record if the count is negative.
If Count < 0 Then
RunCommand acCmdRecordsGoToPrevious
Else
RunCommand acCmdRecordsGoToNext
End If
End If
Exit_Handler:
Exit Sub
Err_Handler:
Select Case Err.Number
Case 2046 'Can't move to that record
'Suppress this error message.
Case Else
MsgBox "Error " & Err.Number & ": " & Err.Description
End Select
Resume Exit_Handler
End Sub
I used to be able to change records on one of my tables simply by
turning
the
wheel on my mouse. For some reason, this no longer occurs which
necessitates
me to use the up or down keys on my keyboard.
Is there any way to get back this function on my mouse? I am using
Vista
Ultimate and have a Logitech MX900 Mouse/Keyboard setup.