Solved

Make a data control scroll faster?

Posted on 1998-08-10
2
221 Views
Last Modified: 2010-04-30
It seems to scroll with a datacontrol you have to click the mouse to move to each record.

Does anyone have some nifty code that will allow the data control to continue scrolling while the mouse is depressed WITHOUT loading up a buffer that will continue scrolling long after you let up on the mouse button?  I'm looking for "real-time" scrolling.

I really like the behavior of a horizontal scroll bar, but I've had trouble finding the right icons for the buttons (including trying to make them myself).  Any websites have good buttons or icons (first, previous, next, last, etc...).

Keeping a standard look and action for the control is what I'm going for, using either a datacontrol or a scroll bar with buttons.

Thanks!!
0
Comment
Question by:s033slb
2 Comments
 

Accepted Solution

by:
rmayer earned 50 total points
ID: 1468434
To make a simple demonstration, add a timer control (Interval = 250) and a small label control (Caption = "", BorderStyle = 1) to your form with your data control and bound textboxes.  Try this following sample code:

Private Sub lblButton_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    lblButton.Caption = "X"
End Sub

Private Sub lblButton_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    lblButton.Caption = ""
End Sub

Private Sub Timer1_Timer()
    If lblButton.Caption = "X" Then
        If Not Data1.Recordset.EOF Then
            Data1.Recordset.MoveNext
        End If
    End If
End Sub

When you left-click on the label and hold the button down, you will see the steady scrolling through the recordset.  For a nice application, you would need to replace the label with a multi-state button or a 3-D panel control which can simulate the behavior of a button when it is clicked.  In the Timer event, you would simply need to check to see if your "button" is in its depressed state, in which you would call MoveNext or MovePrevious depending on which direction you wish to scroll.
0
 

Author Comment

by:s033slb
ID: 1468435
Thanks.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

708 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

16 Experts available now in Live!

Get 1:1 Help Now