Link to home
Start Free TrialLog in
Avatar of reefcrazed
reefcrazed

asked on

Loading 100 rows, reload after you hit the last row

It sounds easy to do, but I have written several things that did not work. I tried to create a function for this and it partially worked. Starting over now, this is all I have.

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        OleDbDataAdapter1.Fill(DataSet11, 1, 100, "table")
      End Sub
 
 Private Sub NavPrev_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Me.BindingContext(DataSet11, "table").Position = (Me.BindingContext(DataSet11, "table").Position - 1)
        Me.PositionChanged()
End Sub

 Private Sub navNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles navNext.Click
        Me.BindingContext(DataSet11, "table").Position = (Me.BindingContext(DataSet11, "table").Position + 1)
        Me.PositionChanged()
End Sub

Public Sub PositionChanged()
        Me.navlocation.Text = (((Me.BindingContext(DataSet11, "table").Position + 1).ToString + " of  ") _
               + Me.BindingContext(DataSet11, "table").Count.ToString)
End Sub
 
   
 
ASKER CERTIFIED SOLUTION
Avatar of Sancler
Sancler

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of reefcrazed
reefcrazed

ASKER

I think that is good enough for what I need.