Solved

Using scroll bars

Posted on 1998-07-29
5
155 Views
Last Modified: 2011-10-03
Hi,
  I trying to use the vertical scroll bar in my UI to navigate between records in an Access Table. The value property
works fine but how do i scroll between the first record and the last record in both directions so i may be able to see
the entire table? Is there any way to display the record number too like the one in Access table wizard? Any help ??
0
Comment
Question by:ravicha
  • 2
  • 2
5 Comments
 
LVL 2

Expert Comment

by:shchuka
ID: 1467140
Can you clarify a little bit more on that?

Do you want to display the record number of the current record or do you want to display the number of records?  or what?
0
 
LVL 1

Accepted Solution

by:
blwatkins earned 50 total points
ID: 1467141
A standard Scroll bar from MS, doesn't have the ability to show a pop value like Access.

But,

Answer 1..
I assume you are using a data control.

  The first step is to set the max property to the value of the number of records in your recordset:

  Put the following in your from_Activate event:

     Data1.recordset.movelast
     Data1.Recordset.movefirst    
     Vscroll1.max = data1.recordset.recordcount

  Then in the Vscroll1's change event put the following code:

        Text1.Text = VScroll1.Value & " of " & vscroll1.max
        Data1.Recordset.AbsolutePosition = VScroll1.Value
 
  The text1.text will say "1 of # of records" this will give the user the recordnumber he/she is on.


Thanks I hope this works for you....


0
 

Author Comment

by:ravicha
ID: 1467142
Thanks blwatkins. It works!!
0
 

Author Comment

by:ravicha
ID: 1467143
Hi shchuka, i want to display the record number like "Record #1" , "Record #2" ..etc. and the contents of that record in the text boxes too. How do we do that??
0
 
LVL 1

Expert Comment

by:blwatkins
ID: 1467144
Do you still have unanswered questions about this?

"Record #1" etc....


0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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 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…

757 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

22 Experts available now in Live!

Get 1:1 Help Now