Scroll Wheel In Access 2007

D

doubleJ

Apparently, there are a lot of people that didn't like the scroll wheel
navigating records in Access 2003. Well, Access 2007 doesn't do that and now
I don't like it. I've been through the access options and help and haven't
seen a way to set it.
Does anyone have an idea?
JJ
 
A

Allen Browne

Use the new MouseWheel event procedure of the form.

If the Count is negative, use:
RunCommand acCmdRecordsGotoPrevious
If it's positive, use:
RunCommand acCmdRecordsGotoNext
 
D

doubleJ

Below is the code that I ended up with, but it didn't work. I don't get an
error or anything. This is my first effort in vb, so please bear with me.
JJ

Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal Count As Long)
If Count = negative Then
RunCommand acCmdRecordsGoToPrevious
End If
If Count = positive Then
RunCommand acCmdRecordsGoToNext
End If
End Sub
 
A

Allen Browne

Try:
If Count < 0 Then
etc.

I suggest you add this line to the very top of your module:
Option Explicit

It will then give you an error when you use an undeclared word (such as
negative or positive.)
 
D

doubleJ

This does work. Thank you...
If I'm at the beginning and accidentally go backward it pops up an error.
The same happens if I'm at the end and accidentally go forward.
Is there a way to suppress the error in that instance?
JJ
 

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

Top