Scrolling

baba78

Registered User.
Local time
Today, 00:30
Joined
Jan 19, 2009
Messages
38
Hi,
Not sure if what I'd like to do is possible but on my database we use it to record events. Each form represents a new event. The issue is that when you're editing or viewing a particular event, when you use the mouse wheel to scroll up and down the screen it moves up and down to the next or previous events rather than having selected the form being viewed.
Is there a way of changing this so that it scrolls up and down the form you're viewing?
 
First off you really need to take the time to at least learn the names of the objects within Access. Otherwise even asking questions here is difficult!

Each "event" is not represented by a different "form!" Each "event" is represented by a different "record" in the same "form."

If you're running Access 2007, you already have a function that addresses this issue! Just check with Help for the details.

For all other versions, you'll need some outside help. A gentleman by the name of Stephen Lebans has a sample database that does this and it can be downloaded at:

http://www.lebans.com/mousewheelonoff.htm

First, download and unzip the db and take a look. Go into your db and goto File > External Data > Import and import the module modMouseHook from the sample database. Next make sure you have the included file, MouseHook.dll, in the same folder your database resides in. The following code needs to run before the mousewheel will be locked:

Private Sub Form_Load()
'Turn off Mouse Scroll
blRet = MouseWheelOFF
End Sub

If you have one form that always loads first in your db, place the code there. If the first form to load varies, place the same code in each form.

You should be set now.

Linq ;0)>

'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Formatted Version

If you're running Access 2007, you already have a function that addresses this issue! Just check with Help.

For all other versions, you'll need some outside help. A gentleman by the name of Stephen Lebans has a sample database that does this and it can be downloaded at:

http://www.lebans.com/mousewheelonoff.htm

First, download and unzip the db and take a look. Go into your db and goto File > External Data > Import and import the module modMouseHook from the sample database. Next make sure you have the included file, MouseHook.dll, in the same folder your database resides in. The following code needs to run before the mousewheel will be locked:

Code:
Private Sub Form_Load()
 'Turn off Mouse Scroll
 blRet = MouseWheelOFF
End Sub
If you have one form that always loads first in your db, place the code there. If the first form to load varies, place the same code in each form.

You should be set now.
 

Users who are viewing this thread

Back
Top Bottom