Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Recordset.edit in a Loop (VB6 DAO)
#2
Hate Myself for doing a thread out of this, The Solution:
Code:
Dim R As Integer
        Dim C As Integer
        C = 0
        R = 1
        Do Until C = FGfac.Rows - 1
        If cmdagregar.Enabled = True Then
        RST.AddNew
        Else
        RST.Edit
        End If
        RST![N° Factura] = txtnumfactura
        RST![Codigo Producto] = FGfac.TextMatrix(R, 0)
        RST![Cantidad Producto] = FGfac.TextMatrix(R, 2)
        C = C + 1
        R = R + 1
        RST.Update
If cmdagregar.Enabled = False Then
        RST.MoveNext
End If
        Loop
RST.Close

Works like a charm now


Messages In This Thread
Recordset.edit in a Loop (VB6 DAO) - by FenixR - 2011-10-12, 01:10 PM
Recordset.edit in a Loop (VB6 DAO) - by FenixR - 2011-10-12, 01:40 PM
Recordset.edit in a Loop (VB6 DAO) - by Spaz - 2011-10-12, 07:38 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)