2003 Database won't compile




I am having trouble compiling my Access 2003 database when I use a module
that prevents the mouse wheel from advancing the records in a data input
form. The problem with using the mouse wheel is that there is no way to
stop the mouse wheel from advancing beyond the last record in the database
and thus causing an uncontrolled entrance into a new record.



I found a procedure on the internet that prevents the mouse wheel from
scrolling through the records but still allows the wheel to scroll in list
and combo boxes. This procedure included a tiny database to demonstrate the
controlled mouse wheel. The procedure consists of a module to access a
'MouseHook.dll' file (not an ActiveX control) which is placed in the same
folder as your database or the System32 folder. There are also a couple of
functions in the module which are called from the Form Load and Form Close
events of my 'Data Input Form' to turn the mouse wheel on and off.



The demonstration program compiles without a hitch. When I transfer the
module and coding into my database it controls the mouse wheel perfectly,
but when I try to compile the database code it gives me a Visual Basic error
message of "User-defined type not defined". No coding is highlighted to
indicate what the message refers to.



My database compiles without error without this module and coding added. I
have compared the references list in both databases and they are the same,
and are listed in the same order. My database does contain an extra
reference to the Common Dialog Control 6.0 but is at the bottom of the
reference list. It cannot be a misspelling as the code for the module was
copied and pasted into my database module. I have checked and rechecked the
spelling of the function calls in the Form Load and Form Close event
procedures.



I have been battling this for over a month. Any ideas on what is happening?


.



Relevant Pages

  • Re: 2003 Database wont compile
    ... The problem with using the mouse wheel is that there is no way to ... This procedure included a tiny database to demonstrate the ... 'MouseHook.dll' file (not an ActiveX control) which is placed in the same ... My database compiles without error without this module and coding added. ...
    (microsoft.public.access.formscoding)
  • Re: Theres got to be a better way
    ... I work with annoyingly complex database tables whose structure ... but then you aren't much of a programmer. ... Programming is all about reinventing the wheel. ...
    (comp.lang.php)
  • Re: Help me before I reinvent the wheel
    ... disadvantage of not knowing how monumentally large the wheel is. ... And are you asking about home addresses or business ... Your BEST BET is likely an annual scrubbing of your database by the USPS. ... standardization formulae, and only got to 95% accuracy. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Ive gone to Lebans and read through the posts on the mouse wh
    ... Do I need to copy the database into the shared ... >>> add that when I first used the mouse wheel disabling procedure it ... >>> references in mine, and discovered that I was missing one. ...
    (microsoft.public.access.forms)
  • Re: Global datasets
    ... Sticking with the first method again. ... Populate my DataSet from the Database ... Create another control object instance ... re-instantiating it. ...
    (microsoft.public.dotnet.framework.aspnet)

Loading