Solved

Using scroll bars

Posted on 1998-07-29
5
158 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…

830 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