Click here to Skip to main content
15,896,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Does anyone know of any code that can be used to move to next record when making a visual basic 2008 application, i have tried these but none of them work

VB
Private Sub RecLocation()
  me.lblLocation.text = ((Me.BindingContext (objDsCompany, "Worker").Position +1).ToString + " of ") _
  + Ne.BindingContext(objDsCompany, "Workers").Count.ToString)
  RecLocation
End Sub

Private Sub btnFirst_Click(ByVal sender As System.Object, ByVal e .....)
 Me.BindingContext(objDsCompany, "Worker").Position =0
 RecLocation
End Sub

Private Sub btnLast_Click(ByVal sender As System.Object, ByVal e .....)
  Me.BindingContext(objDsCompany, "Worker").Position = (Me.objDSCompany.Tables("Worker").Rows.Count -1)
  RecLocation()
End Sub

Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e .....)
  Me.BindingContext(objDsCompany, "Worker").Position =Me.BindingContext (objDsCompany, "Worker").Position +1)
  RecLocation()
End Sub

Private Sub btnPrev_Click(ByVal sender As System.Object, ByVal e .....)
  Me.BindingContext(objDsCompany, "Worker").Position = Me.BindingContext(objDsCompany, "Worker").Position -1)
  RecLocation
End Sub
Posted
Updated 18-Aug-11 10:50am
v2

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900