How can i prevent mouse wheel changing records in a form?
How can i prevent mouse wheel changing records in a form?
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:
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.Code:Private Sub Form_Load() 'Turn off Mouse Scroll blRet = MouseWheelOFF End Sub
You should be set now.
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:
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.Code:Private Sub Form_Load() 'Turn off Mouse Scroll blRet = MouseWheelOFF End Sub
You should be set now.
Thats working very nicely, many thanks. So I suppose it has blocked the mouse wheel, is it possible that it does not roll the data but it does roll the page because its always easier to roll the page with mouse and enter the data??
Have no idea! Don't have version 2003 available, right now, and I never make forms so long as to require the usert to scroll in order to view/enter all data! This is considered, by most experienced developers, to be very user-unfriendly!
If you have more fields than will comfortably fit on one screen, the usual approach is to use a Tabbed Control, group your fields together, logically, and place them on multiple Pages of the TC.
But why not answer your question yourself? Why not simply try it out?
Linq ;0)>
I but the above code in my form load and it isn't working for me..any suggestions?
Have you downloaded the Lebans sample database and followed the instructions as given in Post #2?
Linq ;0)>