I have the code for the next button. The data in the database show up normally. 

The problem is when I click next button, the data will be repeated again as --> data1 > data2 > data3 > data1 > data2...

I've to been told that I should count the maximum rows but I didn't know how to do it; I've search for the coding as well, but nothing that I understand came out.

Please help me~~~ (I am not very good with English, sorry)

> 
> Private Sub btnNext\_Click(ByVal sender As System.Object, ByVal e As
>  System.EventArgs) Handles btnNext.Click
> 
> 
> 
> ```
>     btnBack.Enabled = True
> 
>     da.Fill(dt)
>     If position >= 0 Then
> 
>         position = position + 1
>         Me.lblID.Text = dt.Rows(position).Item("RefNo")
>         Me.txtboxName.Text = dt.Rows(position).Item("Name")
>         Me.rtxtboxAddress.Text = dt.Rows(position).Item("Address")
>         Me.txtboxContactNo.Text = dt.Rows(position).Item("ContNo")
>         Me.txtboxFaxNo.Text = dt.Rows(position).Item("FaxNo")
>         Me.txtboxBrand.Text = dt.Rows(position).Item("Brand")
>         Me.txtboxModel.Text = dt.Rows(position).Item("Model")
>         Me.txtboxSN.Text = dt.Rows(position).Item("SN")
>         Me.rtxtboxProblems.Text = dt.Rows(position).Item("Problems")
>         Me.rtxtboxTechRemark.Text = dt.Rows(position).Item("TechRemark")
>         Me.rtxtboxServChange.Text = dt.Rows(position).Item("ServiceChange")
>         Me.rtxtboxPartChange.Text = dt.Rows(position).Item("PartsChange")
>         Me.txtboxTotal.Text = dt.Rows(position).Item("TotalPrice")
> 
>     End If
> 
> End Sub
> 
> ```
> 
> 

I don't know if this is also need to be told, but... there is two different class

 1) database.vb - sql coding

 2) forms.vb - coding for my visual basic form

 Please help me!!

 **THANKS EVERYONE WHO HELO ME WITH THE ANSWERS!! I HAVE FOUND THE SOLUTION OF THE QUESTION AFTER RE-FIGURED THE CODING.**

 I didn't figure out the position value and the row value is same. My value of position = 0 and dt.Rows.Count = 4, since I have 4 data; so when the position = 0, the row = 1. I get confused about that; I thought both value is starting with 0.