sebastian12 de Noviembre del 2004
PreguntaHola, estoy utilizando este codigo para rellenar un msflexgrid comparando otro y tengo el siguiente problema:
Me funciona solamente el segundo FOR el , primero me no cuenta, queda en 1.-
siendo que el msflexgrid tiene 11 registros
este es el codigo :
For k = 1 To msflexgrid2.Rows - 1
For cf = 1 To mSFlexGrid1.Rows - 1
If (MSFlexGrid1.TextMatrix(c, 12)) = (msflexgrid2.TextMatrix(k, 11)) Then
MSFlexGrid1.TextMatrix(cf, 2) = msflexgrid2.TextMatrix(k, 1)
MSFlexGrid1.TextMatrix(cf, 3) = msflexgrid2.TextMatrix(k, 2)
MSFlexGrid1.TextMatrix(cf, 4) = msflexgrid2.TextMatrix(k, 3)
MSFlexGrid1.TextMatrix(cf, 6) = msflexgrid2.TextMatrix(k, 7)
MSFlexGrid1.TextMatrix(cf, 7) = msflexgrid2.TextMatrix(k, 4)
MSFlexGrid1.TextMatrix(cf, 8) = msflexgrid2.TextMatrix(k, 8)
End If
Next cf, k
Me funciona solamente el segundo FOR el , primero me no cuenta, queda en 1.-
siendo que el msflexgrid tiene 11 registros
este es el codigo :
For k = 1 To msflexgrid2.Rows - 1
For cf = 1 To mSFlexGrid1.Rows - 1
If (MSFlexGrid1.TextMatrix(c, 12)) = (msflexgrid2.TextMatrix(k, 11)) Then
MSFlexGrid1.TextMatrix(cf, 2) = msflexgrid2.TextMatrix(k, 1)
MSFlexGrid1.TextMatrix(cf, 3) = msflexgrid2.TextMatrix(k, 2)
MSFlexGrid1.TextMatrix(cf, 4) = msflexgrid2.TextMatrix(k, 3)
MSFlexGrid1.TextMatrix(cf, 6) = msflexgrid2.TextMatrix(k, 7)
MSFlexGrid1.TextMatrix(cf, 7) = msflexgrid2.TextMatrix(k, 4)
MSFlexGrid1.TextMatrix(cf, 8) = msflexgrid2.TextMatrix(k, 8)
End If
Next cf, k
