Solved

First Record Missing After Mouse Scroll on Subform

Posted on 2006-11-18
13
230 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
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
 

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Familiarize people with the process of utilizing SQL Server stored procedures 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 Micr…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

733 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