• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 238
  • Last Modified:

First Record Missing After Mouse Scroll on Subform

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
riffrack
Asked:
riffrack
  • 5
  • 4
  • 2
  • +1
1 Solution
 
Glenn_MooreCommented:
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
 
puppydogbuddyCommented:
Try this link and see if it helps:

           http://www.lebans.com/mousewheelonoff.htm
0
 
riffrackAuthor Commented:
@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
Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

 
puppydogbuddyCommented:
There is no DLL.  Reread Leban's info.
0
 
puppydogbuddyCommented:
DLL was in the 97 version, not the new version.
0
 
Glenn_MooreCommented:
How long is the subform?  How many fields are there in the form?  Is a tabbed controlled subforms possible?  
0
 
riffrackAuthor Commented:
@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
 
puppydogbuddyCommented:
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
 
riffrackAuthor Commented:
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
 
puppydogbuddyCommented:
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
 
riffrackAuthor Commented:
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
 
DarthModCommented:
PAQd, 500 points refunded.

DarthMod
CS Moderator
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

  • 5
  • 4
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now