Record navigation

G

Guest

I am trying to prevent record navigation with the mouse wheel in Access 2003.

The goal is to have an edit form where the record isn't saved until they
click a button to save or exit without saving, however the mouse wheel still
navigates off the record, which saves it by default.

I have some experience with VB, but I am having trouble figuring out what to
do. Can I change it to a tab function?

Any help would be appreciated.
 
R

Rick Brandt

King said:
I am trying to prevent record navigation with the mouse wheel in
Access 2003.

The goal is to have an edit form where the record isn't saved until
they click a button to save or exit without saving, however the mouse
wheel still navigates off the record, which saves it by default.

I have some experience with VB, but I am having trouble figuring out
what to do. Can I change it to a tab function?

Any help would be appreciated.

Enter the following into a Google search...

"Stephen Lebans" +mousehook.dll

....and click on the first link returned.
 
G

Guest

I entered the code as written, placing the appropriate sections in the
On_Load and On_UnLoad proceedures, however I am getting an error stating the
calling method does not match the description of the item with the same name.

I noticed this was written for Access 2000. Do you know if there is a
difference in 2003?
 
R

Rick Brandt

King said:
I entered the code as written, placing the appropriate sections in the
On_Load and On_UnLoad proceedures, however I am getting an error
stating the calling method does not match the description of the item
with the same name.

I noticed this was written for Access 2000. Do you know if there is a
difference in 2003?

As far as I know the only difference is between Access 97 and "all newer
versions".

What does your exact code look like?
 
G

Guest

I just imported the module so it is exactly the same as supplied.

This is the code for the form:(important parts were copied and pasted from
provided code.)

Option Compare Database
Option Explicit

Private Sub Form_Load()
' Turn the MouseWheel Off
Dim blRet As Boolean
' Call our MouseHook function in the MouseHook dll.
' Please not the Optional GlobalHook BOOLEAN parameter
' Several developers asked for the MouseHook to be able to work with
' multiple instances of Access. In order to accomodate this request I
' have modified the function to allow the caller to
' specify a thread specific(this current instance of Access only) or
' a global(all applications) MouseWheel Hook.
' Only use the GlobalHook if you will be running multiple instances of Access!
blRet = MouseWheelOFF(True, False)
End Sub

Private Sub Form_Unload()
'Turn the MouseWheel ON
Dim blRet As Boolean
blRet = MouseWheelON()
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top