MS Access Forum / Modules / DAO / VBA / November 2006
Disabling mouse wheel
|
|
Thread rating:  |
mikelee101 - 30 Oct 2006 21:27 GMT Hello, I visited Stephen Lebans site (http://www.lebans.com/mousewheelonoff.htm) and downloaded his solution for disabling the mouse wheel in Access 2000. I put it in the Load event of a form. However, when the form is loaded, I get the following error ( braces {} my clip, brackets [] part of error message):
========begin error text=========
{DB Name} The expression On Load that you entered as the event property setting produced the following error: A problem occurred while {DB Name} was communicating with the OLE server or ActiveX Control. *The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure]. *There may have been an error evaluating the function, event, or macro.
=========end error text==========
If anyone has used this solution and has any ideas where the problem may lie, I'd appreciate any info you have. I have tried having the DLL in both my system folder and in the same folder as the mdb. I also moved the module with the function definitions into the database, to no avail.
Thanks to all.
 Signature Mike Lee McKinney,TX USA
Tom Wickerath - 31 Oct 2006 00:18 GMT Hi Mike,
Did you download the sample database that Stephen makes available? Try that one and see if you get a similar error. If that one works fine, then reverse engineer it to see what he did differently.
Tom Wickerath Microsoft Access MVP
http://www.access.qbuilt.com/html/expert_contributors.html http://www.access.qbuilt.com/html/search.html __________________________________________
> Hello, > I visited Stephen Lebans site (http://www.lebans.com/mousewheelonoff.htm) [quoted text clipped - 20 lines] > > Thanks to all. mikelee101 - 31 Oct 2006 17:23 GMT Yes, it works fine in his sample database. Unfortunately, I can't seem to nail down what's different with mine. Whether I put the code on a button click event, or a form load/unload event, I still get the same error (event specific). I've tried putting a breakpoint on the first line of code, but it doesn't get to that point, so it must be something happening during compile(?). There's not an OLE server (the whole database is resident on my machine), so I'm assuming that Access isn't recognizing the MouseWheelOn and MouseWheelOff functions as functions. However, I've never done anything in VBA before that relied on libraries, so I don't know that I could identify the problem without being able to step through his code, which I can't seem to be able to do.....
Thanks.
 Signature Mike Lee McKinney,TX USA
> Hi Mike, > [quoted text clipped - 34 lines] > > > > Thanks to all. mikelee101 - 31 Oct 2006 18:48 GMT Tom, I've tried a few more things, and managed to confuse myself even further, but maybe it'll help shed some light.
First, I found this in the knowledge base:
http://support.microsoft.com/default.aspx/kb/907337/en-us
It says this error can be caused by creating a module in one non-unicode language and trying to run it on a machine with a different non-unicode language as the default. Based on Mr. Lebans' geography, I guessed he would have been using English(Canada) and installed that on my machine. I now still get the error when I click a button, but no longer get the error on the form load/unload events. However, nothing appears to happen on the load/unload events (I can't even make them display a messagebox).
I created macros which use RunCode to run the mousewheelon and mousewheeloff functions. If I run those from the database window or the tools menu, they work perferctly. However, if I try to use docmd.runmacro on a button click, I still get the error. If I try to use docmd.runmacro on form load/unload, nothing happens (no error, but no results either).
Sort of feel like I might be narrowing it down a little (maybe?) but still can't crack the nut. If any of this gives you any ideas, I'd certainly appreciate it.
Thanks again for the help.
BTW--Access 2000, Office 2003, XP Tablet Edition SP2 if I didn't already mention that.
 Signature Mike Lee McKinney,TX USA
> Hi Mike, > [quoted text clipped - 34 lines] > > > > Thanks to all. Tom Wickerath - 31 Oct 2006 23:26 GMT Hi Mike,
I will bring this thread to Stephen's attention. Perhaps he will drop in and be able to offer better advice.
> BTW--Access 2000, Office 2003 I take it that your copy of Office 2003 does not include Access 2003?
Tom Wickerath Microsoft Access MVP
http://www.access.qbuilt.com/html/expert_contributors.html http://www.access.qbuilt.com/html/search.html __________________________________________
> Tom, > I've tried a few more things, and managed to confuse myself even further, [quoted text clipped - 26 lines] > BTW--Access 2000, Office 2003, XP Tablet Edition SP2 if I didn't already > mention that. mikelee101 - 01 Nov 2006 17:01 GMT Hello Tom, I tried one more thing, and it seemed to work. I opened a blank database and imported all of the tables, queries, forms, macros and modules out of the one that was giving me the error. Everything worked fine in the new database. Apparently it was something with that specific mdb, but I can't even begin to guess what. It might be that the timing of it starting when I added Stephen's code was just a coincidence (or, not a coincidence, but not related to his code either).
Thanks again for all of the help.
 Signature Mike Lee McKinney,TX USA
> Hi Mike, > [quoted text clipped - 41 lines] > > BTW--Access 2000, Office 2003, XP Tablet Edition SP2 if I didn't already > > mention that. Tom Wickerath - 01 Nov 2006 18:41 GMT Thanks for the followup Mike. As promised, I contacted Stephen. He indicated that you had already been in contact with him. Anyway, I'm glad to hear that you've got it working now.
Tom Wickerath Microsoft Access MVP
http://www.access.qbuilt.com/html/expert_contributors.html http://www.access.qbuilt.com/html/search.html __________________________________________
> Hello Tom, > I tried one more thing, and it seemed to work. I opened a blank database [quoted text clipped - 7 lines] > > Thanks again for all of the help.
|
|
|