I am trying to work the next and previous button to read or navigate throughrecords, please help me to correct this, I'm stuck here:

Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click

    Dim k As Integer
    Dim i As Integer
    k = 1
    i = k + 1
    Try
        FileGet(1, MyEmployees, k)
        With MyEmployees
            TextBox1.Text = .ZipCode
            TextBox2.Text = .PONumber
            TextBox3.Text = .FirstName
            TextBox4.Text = .LastName
            TextBox5.Text = .SSN
            TextBox6.Text = .DOB

        End With
    Catch ex As Exception
        MsgBox("Error in reading")
    End Try
End Sub

The way I read your code is that k is 1 and i is 2 on every click of the button. If you meant to increment a number, why Dim?

Nod to Static.

Note: This only tackles part on what you are trying to do, so as to not write it for you, just a little note about one thing and not all things.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.