Title: move first record last record set record count next record                                 If you need copy same format use firefox or chrome or safari but iexplorer not work


Preview of Code
Module Navigstion
 
    Public Current As Integer
 
    Public Sub NavigateRecords(ByVal text1 As Windows.Forms.TextBox, ByVal text2 As Windows.Forms.TextBox, ByVal ds As DataSet, ByVal field As String)
 
 
        
        Try
            text1.DataBindings.Add("Text", ds, "table.id")
            text2.DataBindings.Add("Text", ds, field)
 
        Catch ex As Exception
 
        End Try
 
 
    End Sub
 
    ` set record count
    Public Sub record_count(ByVal form As Windows.Forms.Form, ByVal ds As DataSet, ByVal lbl_count As Windows.Forms.Label)
        lbl_count.RightToLeft = Windows.Forms.RightToLeft.Yes
        lbl_count.Text = form.BindingContext(ds, "table").Count & "/" & form.BindingContext(ds, "table").Position + 1
 
    End Sub
 
    `move to the frist record --------------
    Public Sub frist_record(ByVal form As Windows.Forms.Form, ByVal ds As DataSet, ByVal lbl_count As Windows.Forms.Label)
 
 
        form.BindingContext(ds, "table").Position = 0
        Current = form.BindingContext(ds, "table").Position
        record_count(form, ds, lbl_count)
    End Sub
 
    `move to  next record -----------------
    Public Sub previous_record(ByVal form As Windows.Forms.Form, ByVal ds As DataSet, ByVal lbl_count As Windows.Forms.Label)
        form.BindingContext(ds, "table").Position -= 1
        Current = form.BindingContext(ds, "table").Position
        record_count(form, ds, lbl_count)
    End Sub
 
    `move to  next record -----------------
    Public Sub next_record(ByVal form As Windows.Forms.Form, ByVal ds As DataSet, ByVal lbl_count As Windows.Forms.Label)
        form.BindingContext(ds, "table").Position += 1
        Current = form.BindingContext(ds, "table").Position
 
        record_count(form, ds, lbl_count)
    End Sub
 
    `move to  last record -----------------
    Public Sub last_record(ByVal form As Windows.Forms.Form, ByVal ds As DataSet, ByVal lbl_count As Windows.Forms.Label)
        form.BindingContext(ds, "table").Position = form.BindingContext(ds, "table").Count - 1
        Current = form.BindingContext(ds, "table").Position
 
        record_count(form, ds, lbl_count)
    End Sub
 
 
 
End Module