Solved

Make a data control scroll faster?

Posted on 1998-08-10
2
224 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

773 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