Solved

Using scroll bars

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…

803 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