0

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
2
Contributors
1
Reply
7
Views
2 Years
Discussion Span
Last Post by rproffitt
0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.