Solved

Using scroll bars

Posted on 1998-07-29
5
160 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
[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
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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 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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

695 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