I am new to VB.NET. Can anyone help. I have created a windows form attched to a database. When the form loads it show the first record, but I cant navigate off this record. Any help would be great. Here is the code I have for the navigation buttons.
Private Sub NavigationButtons_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFirst.Click, _
btnPrev.Click, btnNext.Click, btnLast.Click
Select Case sender.Name
Case "btnFirst"
MasterBindMgr.Position = 0
Case "btnprev"
If MasterBindMgr.Position > 0 Then
MasterBindMgr.Position -= 1
End If
Case "btnnext"
If MasterBindMgr.Position < MasterBindMgr.Count - 1 Then
MasterBindMgr.Position += 1
End If
Case "btnlast"
MasterBindMgr.Position = MasterBindMgr.Count - 1
End Select
Me.DisplayPosition()
End Sub
Private Sub NavigationButtons_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFirst.Click, _
btnPrev.Click, btnNext.Click, btnLast.Click
Select Case sender.Name
Case "btnFirst"
MasterBindMgr.Position = 0
Case "btnprev"
If MasterBindMgr.Position > 0 Then
MasterBindMgr.Position -= 1
End If
Case "btnnext"
If MasterBindMgr.Position < MasterBindMgr.Count - 1 Then
MasterBindMgr.Position += 1
End If
Case "btnlast"
MasterBindMgr.Position = MasterBindMgr.Count - 1
End Select
Me.DisplayPosition()
End Sub