Solved

Make a data control scroll faster?

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

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

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…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
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…
Suggested Courses
Course of the Month6 days, 1 hour left to enroll

627 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