Access 2007 not changing records with wheel

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
sounds to me like you need a mouse driver dog; im not sure that this
has anything to do with MS Access


does this work like you expect in IE?
 
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
 
Thanks Allen. I am still a little new at this. How do I add this code?

David
 
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.
 
For anyone researching this, there's a new article with details of how to
set this up:
Scroll records with the mouse wheel in Access 2007
at:
http://allenbrowne.com/ser-70.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Allen Browne said:
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
 
Awesome! It works great.
Allen, you're a champ... Thank you.

David

Allen Browne said:
For anyone researching this, there's a new article with details of how to
set this up:
Scroll records with the mouse wheel in Access 2007
at:
http://allenbrowne.com/ser-70.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Allen Browne said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top