Solved

Using the mousehook from Lebans.com in an access project

Posted on 2004-04-13
10
307 Views
Last Modified: 2007-12-19
Ok, I've downloaded mousehook from  http://www.lebans.com/mousewheelonoff.htm and have sucessfully gotten it to work on a small stand alone access database, with a couple of users, by putting the dll in the same folder as the database.  I'd like to use it in a larger app I have set up as a SQL server backend and Access Project front end.  

I can't seem to get it to work.  I put the code in the OnLoad event of the first form that opens, so it disables the wheel right away.  However when the form is loaded is comes up with an error the dll can't be found.  I've put the dll in the same folder as the front end.  

Has anyone used the mousehook in this manner before, that might be able to shed some light on my situation?

Thanks
Tom
0
Comment
Question by:TomDuCrosbie
  • 4
  • 3
  • 3
10 Comments
 
LVL 32

Expert Comment

by:jadedata
ID: 10815710
Greetings TomDuCrosbie!

  The dll needs to be registered by the Installer app when it loads, or manually if no deployment app is used.
 
  Measures need to be taken to assure that another more current dll is not already registered and running that another application may depend on.

regards
jack
0
 

Author Comment

by:TomDuCrosbie
ID: 10815794
THe notes on Lebans.com said  not to register or set references to the dll from within access, just placed in the folder where the app front end is located, or place into the windows/system file.

My network admin wouldn't allow me to use the knowledge base method with the registring of the dll.  so I'm trying to get it to work around it.

Tom
0
 
LVL 32

Expert Comment

by:jadedata
ID: 10816136
MVPS.org also has some API mousewheel control but this is going to be OS specific perhaps.
 http://www.mvps.org/access/api/api0036.htm
0
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
LVL 32

Expert Comment

by:jadedata
ID: 10816201
0
 
LVL 54

Accepted Solution

by:
nico5038 earned 100 total points
ID: 10817310
Hmm, I use this version:
http://support.microsoft.com/default.aspx?scid=kb;en-us;278379

In the "all Access" way and it does work in a network environment.

Nic;o)
0
 

Author Comment

by:TomDuCrosbie
ID: 10817656
Nico, I added the code for the "all  access" version, however now when I compile the code, I get a comple error on a line that previously didn't raise any errors.  here's the code

    Else
        DoCmd.Close acForm, "frmExistingCustomer"
        'check to see if the frmexisting business form is open
        'if it is not, open the switchboard
        varState = SysCmd(acSysCmdGetObjectState, acForm, "frmExistingBusiness")
        If varState = 1 Then
            Exit Sub
        Else
            DoCmd.OpenForm "Switchboard"
        End If
    End If

The line raising the compile error is

varState = SysCmd(acSysCmdGetObjectState, acForm, "frmExistingBusiness")

Any ideas as to why this is happening?

tom
0
 
LVL 54

Expert Comment

by:nico5038
ID: 10817747
Nope, looks very odd, what's the error message ?

Nic;o)
0
 

Author Comment

by:TomDuCrosbie
ID: 10822929
The error is

Compile Error
Variable not defined

0
 

Author Comment

by:TomDuCrosbie
ID: 10824046
Wow!  it's amazing how a little sleep and a pot of coffee can clear things up.  I had been writing in notes about the code and accadently put a   '    in front of where I declaired varState.

It's working great again.  Thanks for the help!

Tom
0
 
LVL 54

Expert Comment

by:nico5038
ID: 10825201
It are always those nasty tiny bugs...

Glad it's working !

Nic;o)
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question