Error: system.data.rbtree'1.GetNodeByIndex(Int32 userIndex) with VB Net and Access
<p>I´m trying to get a value from a query with VB Net and Access database and works only for the first record, after that I´m getting this error:</p>

<blockquote>
  <p>system.data.rbtree'1.GetNodeByIndex(Int32 userIndex)
  System.Data.DataRowCollection.get:Item(Int32 index)
  NAMEOFMYPROJECT.Form2.Button24_Click(Object sender, EventArgs e)
  in MYPROJECTPATH\Form2.vb:line 1048</p>
</blockquote>

<p>This is my snippet:</p>

<pre><code>    For i As Integer = 0 To DataGridView2.Rows.Count - 2
        Try
            ConexionBD.Open()
            ComandoBD.Connection = ConexionBD
            ComandoBD.CommandText = "INSERT INTO Ventas (IdProducto, Fecha, Hora) VALUES (@IdProducto, @Fecha, @Hora)"
            ComandoBD.Parameters.Add("@IdProducto", OleDbType.VarChar).Value = Form2.DataGridView2.Rows(i).Cells(0).Value
            ComandoBD.Parameters.Add("@Fecha", OleDbType.DBDate).Value = Now
            ComandoBD.Parameters.Add("@Hora", OleDbType.DBTime).Value = Now.TimeOfDay
            ComandoBD.ExecuteNonQuery()

            consulta = "SELECT CantidadDisponible FROM Productos WHERE Detalle='" &amp; DataGridView2.Rows(i).Cells(1).Value.ToString &amp; "'"
            adaptador = New OleDbDataAdapter(consulta, ConexionBD)
            registros = New DataSet
            adaptador.Fill(registros, "Productos")
            If registros.Tables("Productos").Rows.Count() &lt;&gt; 0 Then
                 msgbox(registros.Tables("Productos").Rows(i).Item(0)) 'HERE IS WHERE THE ERROR IS POINTING AT
            Elseif
                 msgbox("There is no available......")  'THIS MESSAGE ITS NEVER SHOWN
            End If

            ComandoBD.Dispose()
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try
        ConexionBD.Close()
    Next
</code></pre>

<p>Sorry if my question is too basic but I can´t find why is happening
PS: the database is not empty and the columns have the correct numbers</p>