Solved

First Record Missing After Mouse Scroll on Subform

Posted on 2006-11-18
13
231 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
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
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

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
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 how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

718 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