Perhaps, what you meant to do was have the
Next
at the bottom of the code, rather than at the top...
That way, ct would change for each row, rather than just being set to the number of rows before you actually use it?
Dim ct As Integer
For ct = 0 To .Tables(0).Rows.Count - 1
Dim ls As New ListViewItem
ls.Text = .Tables(0).Rows(ct).Item(0)
If ls.SubItems.Add(.Tables(0).Rows(ct).Item(2)) <= ls.SubItems.Add(.Tables(0).Rows(ct).Item(2)) Then
ls.BackColor = Color.Yellow
lvpoapproveitem.Items.Add(ls)
End If
Next