Solved

First Record Missing After Mouse Scroll on Subform

Posted on 2006-11-18
13
226 Views
Last Modified: 2010-05-18
Hi there

Has any come across this problem before and managed to solve it without using any DLLs?

When a continous subform has only a few reords on it, then using the mouse scroll the first record disappears and cannot be shown again (using the mouse scroll).

Any help appreciated.
0
Comment
Question by:riffrack
  • 5
  • 4
  • 2
  • +1
13 Comments
 
LVL 14

Expert Comment

by:Glenn_Moore
ID: 17972110
I just tried it on a form with 61 records.  I can scroll either up or down throughout all of the records.  
What version of Access are you using?  Have you installed all of the updates?
What does the counter at the bottom of the screen say, can you click to the first record?
0
 
LVL 38

Expert Comment

by:puppydogbuddy
ID: 17972201
Try this link and see if it helps:

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

Author Comment

by:riffrack
ID: 17972218
@Glenn_Moore
it only happens when there aren't enough records in the subform to reach the bottom of the subform, ie when there are only 2 or 3 records in the subform. I have Access 2003 with all the updates

@puppy
Yes, thanks I had found that link from previous posts, but as mentioned above I am looking for a solution without a DLL

0
 
LVL 38

Expert Comment

by:puppydogbuddy
ID: 17972336
There is no DLL.  Reread Leban's info.
0
 
LVL 38

Expert Comment

by:puppydogbuddy
ID: 17972344
DLL was in the 97 version, not the new version.
0
 
LVL 14

Expert Comment

by:Glenn_Moore
ID: 17972410
How long is the subform?  How many fields are there in the form?  Is a tabbed controlled subforms possible?  
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:riffrack
ID: 17973910
@puppydogbuddy
I downloaded it previously & it still has a DLL called MouseHook.dll

@Glenn_Moore
To reproduce this error, create a continous subform within a form. place a query behind the subform which doesn't return enough records to fill the whole page. Then scroll with your mouse. The first record disappears.
0
 
LVL 38

Expert Comment

by:puppydogbuddy
ID: 17975299
Are you using the correct file?? Here are Leban's own words from the link I gave you:

MouseWheelHook is an MDB demonstrating how to use a MouseHook to turn off the MouseWheel. No more MouseWheel.DLL Hell! <<<<< No DLL registration required.>>>>>  <<<<<<<The MouseHook DLL is a standard Windows DLL>>>>. Do not try to Register it or set a Reference to it from within Access.  Just copy the included MouseHook.DLL into your Windows/System folder or into the same folder as your application MDB. One instance handles all Forms and SubForms so only call the functions once from a SINGLE Form.

0
 

Author Comment

by:riffrack
ID: 17975312
Hi puppydogbuddy

Thanks a lot for trying to help me with this. I quote from his website "Just copy the included MouseHook.DLL into your Windows/System folder".

In my case I cannot add any DLLs to this project, whether they need to be registered or not.

Are there no other solutions? A solution without a DLL and without disabling the mouse wheel.
0
 
LVL 38

Expert Comment

by:puppydogbuddy
ID: 17975450
OK....won't mention Lebans method anymore after this final comment.  Leban DLL is a standard Window's dll, not an active X. and is the commonly accepted solution to your problem.  See this link .....MS, themselves, suggest you create a DLL.

     http://support.microsoft.com/default.aspx?scid=kb;en-us;278379&Product=acc

That having been said, if are using your subform for read only purposes (inquiries), try setting the recordset type in your subform to snapshot and see if that hellps.
0
 

Author Comment

by:riffrack
ID: 17975659
I actually use read and write subforms.

but I think I have found a solution after playing around for a while:

' this variable is declared in the subform
Dim bol_Scroll_Up As Boolean

' This mouse wheel procedure is placed on the subform too
Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal Count As Long)
    If Count <= -1 Then
        If bol_Scroll_Up = False Then
            Me.Requery
            bol_Scroll_Up = True
        End If
    Else
        bol_Scroll_Up = False
    End If
End Sub


seems to work fine for me, after doing quite a bit of testing...

And this solves the problem too, if the scroll bar is hidden when there aren't enough records to fill the page:
http://www.experts-exchange.com/Databases/MS_Access/Q_20696562.html

Thanks again for all your help

0
 
LVL 1

Accepted Solution

by:
DarthMod earned 0 total points
ID: 18025110
PAQd, 500 points refunded.

DarthMod
CS Moderator
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

746 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

11 Experts available now in Live!

Get 1:1 Help Now