Using scroll bars

  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 ??
Who is Participating?
blwatkinsConnect With a Mentor Commented:
A standard Scroll bar from MS, doesn't have the ability to show a pop value like Access.


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:

     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....

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?
ravichaAuthor Commented:
Thanks blwatkins. It works!!
ravichaAuthor Commented:
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??
Do you still have unanswered questions about this?

"Record #1" etc....

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.