Solved

Using the mousehook from Lebans.com in an access project

Posted on 2004-04-13
10
305 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
 
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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

757 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now