Solved

Make a data control scroll faster?

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Use Multiple Forms 4 49
JSON Response and request in VB6 application 11 259
MsgBox 2 48
Using "ScreenUpdating" 6 55
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

863 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

25 Experts available now in Live!

Get 1:1 Help Now