M
Mike B
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?
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?