Private Function validateRow() As Boolean
Dim i As Integer
Dim iRow As Integer
Dim SiguienteConsecutivo As Integer
Dim NumEmbarcacion As String
Dim PaxAAsignar As Integer
Dim strUpdate As String
Dim strInsert As String
Dim strDelete As String
Dim tFields() As String
Dim sTmp As String

    validateRow = True
Si no ha cambiado ningn dato sale de la funcin

    If Not blnFieldChanged Then Exit Function
    
    iRow = SCGrid1.CurrentRow
Redimensiona un array, donde va a almacenar los valores de las celdas
    ReDim tFields(SCGrid1.Cols - 1)
        
    For i = 0 To SCGrid1.Cols  1
Valida el valor de las celda, si hay algn dato mal capturado no te deja continuar hasta que se corrija; el cdigo frmAsignarEmbarcaciones-validateFields.txt muestra la funcin que hace este proceso
        If Not validateFields(iRow, i) Then
            validateRow = False
            Exit Function
        End If
        
        sTmp = SCGrid1.Text(iRow, i)
        Select Case i
        Case 0, 6
        Como solo hay una columna donde se puede capturar algn dato
se almacena el valor del valor de la celda en el array, pero formateado
segn el tipo de dato, para ejecutar de manera correcta la orden SQL que
guarda el registro.
            tFields(i) = sTmp
        End Select
    Next i
        
    On Error GoTo ErrorHandle
            
Se actualiza el registro actual    
        strUpdate = "update [Flujo Embarcaciones Temporal] set "
        strUpdate = strUpdate & SCGrid1.Key(-1, 6) & "=" & tFields(6)
        strUpdate = strUpdate & " where " & SCGrid1.Key(-1, 0) & "=" & tFields(0)
        
        db.Execute strUpdate
        
        StatusBar1.Panels(2).Text = "Asignacion de Embarcacion Modificada"
    initVariables
    cmdAsignaEmbarcaciones.Enabled = True
    On Error GoTo 0
Exit Function
ErrorHandle:
    MsgBox err.Description
    validateRow = False
End Function
