PDA

View Full Version : [SOLVED] Access - How Do I Disable Mouse Wheel?



keyboard88
03-16-2005, 10:51 AM
Access Programing Question: My form opens up to a new record. I need to disable the mouse wheel to prevent scrolling into previous records.

The only info I've been able to find re disabling the mouse wheel involves importing a .DLL file or something similar and then writing a code behind the "On Load" event. I.e.


Dim blRet As Boolean
blRet = MouseWheelOff

I don't want to have to load a file on everyone's computer to accomplish this. Is there another way or trick to prevent scrolling via the mouse wheel to another record?

Any suggestions would be greatly appreciated.

keyboard88

Norie
03-16-2005, 11:13 AM
Why not set Data Entry for the form to Yes?

Then only new records can be added/viewed.

keyboard88
03-16-2005, 12:56 PM
Thanks for the suggestion. This did not quite work.



I have a button on the Main Menu that opens up an "add new record form" (it opens up to a new record). I've done this trick before - Have the Main Menu button open up to a pop-up and ask "Enter a new record?" If yes the record ID (not visible) in entered on the form and the record is saved. From there the pop-up opens up the add new record form where the Pop-up Id = the form ID. (I do this via a macro.) On the new records form I have the "allow Additions" and the "data entry" attributes set to "No". There may be some other property settings in there also, but to make a long story short this works. The use cannot scroll to a previous record - it just stays on the new record that is being worked on.



This is such a long and round about method. I was hoping to find some VBA code I could attach to an event procedure on the form to take care of it.

Steve_Donkin
03-21-2005, 12:42 PM
I have got a module for this exact issue on my databases at work. I wrote it to stop users scrolling through the records instead of scrolling the page.
I am back at work tomorrow so I will dig out a database with the module included and post it tomorrow as a zip file.
Steve

Zack Barresse
04-08-2005, 11:00 AM
Hi Steve! :hi:

Did you ever get that module? Sounds very interesting! :yes

Steve_Donkin
04-08-2005, 11:08 AM
I have got the application, I am just 'cleaning' it.
It is actually a system for notifying insurance claims so I have to remove all refernces to our SQL servers, linked tables and the 'split' database.
I should be able to post the whole app to show how the module works

The mouse wheel is actually a class module refernceing another module, but I will warn you all now, DONT run it in debug mode as the module is referenced each time the mouse itself is moved and it takes ages to watch in debug mode!

I am back in work on Wednesday and should have it cleaned and running then.

Steve

Imdabaum
07-13-2006, 09:03 AM
I have just recieved a similar request at my job. I want people to be able to view all the records and so I have kept the navigation panel open with the approriate buttons that are built in. But because some of these forms are large they want to be able to scroll down the page instead of scrolling into a new record. Is this the solution you are asking for as well?

Imdabaum
07-17-2006, 09:05 AM
I found a way to disable to scroll button from advancing to new records. It disables it completely though and you won't be able to use it to scroll down the page either. Here is the link that I found the solution on.

mousewheel Solution (http://www.access-programmers.co.uk/forums/showthread.php?t=20192)



Edited:
Sorry over the weekend I was looking for a solution, but failed to refresh my mind on your actual question... Sorry I just realized this is probably the solution that you specifically said you don't want.... I'll keep looking for other ways around it.

coliervile
07-17-2006, 06:30 PM
I use Access 200 and had this problem a couple of years ago and someone had sent me the solution in this document. For some reason I can remember what I have to open it with. It's in the wheel.dll