Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Wretched mousewheel problem

Status
Not open for further replies.

ZOR

Technical User
Jan 30, 2002
2,963
GB
I am trying to prevent the mousewheel from changing records. I have been using the MouseHook.DLL which seemed to work and then failed shortly after getting a Microsoft Update on the PC.

I have now been trying , but this throws up an error 2107, the value entered doesn't meet the validation rule defined for the field or control. In the FAQ there is a remmed out Validation Text line? Has this been working for others?, thanks Getting desperate as time running out.
 
On the Lebans example, I have a button with code in that calls the function. However it stops at the line below saying bad dll calling procedure. Has anyone else used this method of killing the mousewheel? I cannot find where I am going wrong not implementing it into my application. The Lebans sample works, and I have imported the module and used the same code as there's, but it fails.

MouseWheelOFF = StopMouseWheel(Application.hWndAccessApp, AccessThreadID, NoSubFormScroll, GlobalHook)
 
It all seems to be in this line of code where its going wrong. If I fire it from a pushbutton on a form AFTER THE DATABASE HAS LOADED it works. If I put the code in the Forms open event, it throws the message of bad calling procedure. Hope someone can answer this problem as I am getting desperate to solve it and move on.

Dim blRet As Boolean
blRet = MouseWheelOFF(False)
 
Have you tried the form's Load event procedure instead of the Open ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks PHV, I have tried it in both the Open and Load events. It was working for a while without problems and then failed. I might consider importing all the forms etc into a new database and start over again with it. Not my weekend, thanks again
 
I use a query which sits on top of the table/query that the form uses. Then i just set it to top one. no dll's or plugins.

"My God! It's full of stars...
 
Thanks Scottian. My forms are bound to tables. I still wonder whether this is going to let me down later as it is a frontend/backend application with 5 people on it. I have set record locking, but after reading lots of ideas on bound/query forms and seeing no advantage (according to others) I went with bound. I have since rebuilt the database by importing bits into a new DB, and it seems to work again. I just worry it will fail later. Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top