mouse scroll wheel

D

Don Frechette

Hello everyone.
I had the problem of the mouse scrolling through records on a form when
using the wheel and corrected it by using Stephen Lebans solution, except
for one computer which still has the problem. It's running Windows XP, as
are all the other computers running this database. Has anyone else had this
problem and if so, how did they solve it? Any help would be appreciated.
Thank you
 
G

Guest

Hi Don,

I guess it would be too much to hope that maybe you just accidentally forgot
to include the mousehook.dll file in the folder where you installed your
front end on the computer that doesn't work, eh?

CW
 
D

Don Frechette

CW,

Yes, that would be too much hope. I already checked for the mousehook.dll
and it was there.The thing about this particular user is that he's the one
that keeps messing up the records by editing the wrong ones after using the
scroll wheel which is why we implemented this in the first place. Could it
be a mouse driver issue? As far as I can see though, his pc had the same
standard XP drivers as the rest of the XP computers.
 
G

Guest

Hi Don,

Beyond making sure the mousehook.dll is properly located and making sure
that the user isn't bypassing the form where you've attached the functions
that need to run, I'm not sure what else it could be.

I do think there's another potential solution, but you'd have to play around
with it and see. The solution: roll your own navigation buttons. Here's
some you could use possibly: http://www.lebans.com/recnavbuttons.htm

I'm not 100% sure that would solve the problem, but I thinnk it might. I'm
guessing there are some additional benefits to rolling your own buttons as
well but, again, I've not done it so I'm not sure.

Hope you get it worked out and sorry I couldn't be of more help.
CW
 
D

Don Frechette

CW,
I'll have to look at that. The mousehook function is called from the
switchboard Form_Load event and I used the GlobalHook so it will work across
multiple forms. The user is running a distributed runtime version of Access
2003 in which the switchboard is what is opened automatically so it can't be
bypassed. The odd thing here is that it work fine on all other computers
running the same OS and version of Access.
Thanks for your input.
Don
 
S

Stephen Lebans

The GlobalHook param is for settings across mutliple instances of the Access
app. YOu should not be setting this param in your specific situation.

You call the MouseWheelOff function once and only ONCE from a single form's
Load event within your app. This will look after all forms, whether opened
now or later.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
D

Don Frechette

Stephen,
So what you are saying is that by calling the mousehook function on the
Form_Load of the switchbard is enough to turn the wheel off on all forms
opened within the same db? I have not actually tried that. I misinterpreted
what was meant by multiple instances. I am novice when it comes to VBA
programming. Could it be possible that by setting the GlobalHook that it's
causing this one computer to act in that manner? I will eliminate the
GlobalHook and see what happens.
Thanks
Don
 
D

Don Frechette

If I am looking at the code right, I believe I do not have the GlobalHook
set: (Optional GlobalHook As Boolean = False)
I just assumed it was by the way the description of the code was written.
Leave it to a novice to see it that way!!
If I am incorrect in this, please let me know and how to properly set it not
to use it.
Thanks,
Don
 
S

Stephen Lebans

As the function declaration shows, it is an optional param. Previously, you
stated you were setting this param. If you are not then fine, simply do not
pass anything for this param when calling the function.

Yes, place the code in the switchboard's Load/Enload events. This one single
call will look after all open forms and any other forms you subsequently
open within your app.

Good luck.
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
D

Don Frechette

Stephen,
Yes I know I had said it was set, but being a novice with VBA, I didn't look
at the code good enough and assumed the GlobalHook was set by default.
Aside from that, the mousehook.dll started working on that user's computer
after a reboot, however this same approach did not work previously. We don't
know why it happened that way, but it did and all is well now.
 

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

Similar Threads


Top