Mouse scroll (wheel) hides the 1st record?

G

Guest

Hi I have a Form and sub form with 1:Many relationship.

If I put the cursor on the subform and scroll down with the weel, the 1st
reocord is hidden. If I scroll up again with the wheel the 1st record
doesn't come back. I have click on the scroll bar on the form to get the 1st
reocrd back on the screen. (the sub form only had 2 records and no need to
scroll in the first place. but for some reason Access is hiding the 1st
record)

I know you can disable the mouse scroll with a dll but I am not allowed to
use dll from 3rd party. Is there a quick trick for this ?

Thanks
 
K

Ken Snell \(MVP\)

What you're experiencing is a "feature" of ACCESS -- in other words, that is
the way it works even though it's frustrating. I know of no workaround other
than clicking on the scroll bar to move back up to see the first record.
 
M

missinglinq via AccessMonster.com

Stephen Lebans has a sample database that does this with a standard Windows
DLL that is already on your PC and can be downloaded at:

http://www.lebans.com/mousewheelonoff.htm

Download and unzip the db and take a look. In your db and goto File >
External Data > Import and import the module modMouseHook from the sample
database.

You need to place a copy of the MouseHook.dll file in the same folder as your
database. It’s normally a Hidden file, so you’ll have to unhide it, Find it,
then copy it to the folder.

In the first form to load in your db use this code:

Private Sub Form_Load()
' Turn off Mouse Scroll
blRet = MouseWheelOFF
End Sub
What you're experiencing is a "feature" of ACCESS -- in other words, that is
the way it works even though it's frustrating. I know of no workaround other
than clicking on the scroll bar to move back up to see the first record.
Hi I have a Form and sub form with 1:Many relationship.
[quoted text clipped - 10 lines]
 
K

Ken Snell \(MVP\)

missinglinq via AccessMonster.com said:
Stephen Lebans has a sample database that does this with a standard
Windows
DLL that is already on your PC and can be downloaded at:

http://www.lebans.com/mousewheelonoff.htm


Stephen's solution is to turn the wheel off or on -- but it does not change
the behavior that the poster is observing with the first record being
"hidden" after scrolling down and back up with the wheel.
 
M

missinglinq via AccessMonster.com

If the wheel's turned off, you can't scroll down and back! His comment

"I know you can disable the mouse scroll with a dll but I am not allowed to
use dll from 3rd party. "

indicated to me that he would do this if he didn't have to use a Third Party
DLL.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 
K

Ken Snell \(MVP\)

I concur, but Stephen's solution also requires an additional dll file,
which, although not registered on the PC, still must exist on the PC. So, I
did not suggest Stephen's solution because he said he cannot use a
third-party dll file.
 
M

missinglinq via AccessMonster.com

Not true, Ken! Lebans' hack uses MouseHook.dll, which is a standard Windows
DLL, not a third party DLL, and already on any Windows based PC!

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 
D

Douglas J. Steele

Stephen coded MouseHook.dll himself.

When Stephen says it's a "standard Windows DLL", he means it's not an
ActiveX DLL.

Standard DLLs are declared in code, using the Declare statement. ActiveX
DLLs are registered, so that they're available to you as part of the Dim
statement.
 
D

Douglas J. Steele

Forgot to mention that with ActiveX DLLs, you need to create a reference
under Tools | References.
 

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