Ver Mensaje Individual
  #1  
Antiguo 08-06-2010
Avatar de chino150
chino150 chino150 is offline
Miembro
 
Registrado: dic 2007
Posts: 86
Reputación: 19
chino150 Va por buen camino
Cita:
Empezado por Faust Ver Mensaje
Puedes detallar más tu problema, parece que el error se trata de un componente visual ya que dice Grid Index out of range, ¿qué componentes viusales usas? y si podrías poner en que parte de tu codigo da el error.
El componente es dbGrid no es el código que marca el error todo fa bien el guarda las modificaciones es cuando le hago click al boton de sigiente o se mueve el siguiente registro que marca el error de todas forma este es el código
Código Delphi [-]
procedure TfrmGAportacion.btnAceptarClick(Sender: TObject);
begin
    if txtRecibo.Text = '' then
        begin
        MessageDlg ('El campo Recibo debe tener un valor.', mtWarning, [mbok], 0);
        txtRecibo.setfocus;
        end;
     if txtNombre.Text = '' then
        begin
        MessageDlg ('El campo Nombre debe tener un valor.', mtWarning, [mbok], 0);
        txtNombre.SetFocus;
        end;
     if txtAporte.Text = '' then
        begin
        MessageDlg ('El campo Aporte debe tener un valor.', mtWarning, [mbok], 0);
        txtAporte.SetFocus;
        end;
     if dblTransac.Text = '' then
        begin
        MessageDlg ('El campo Transacción debe tener un valor.', mtWarning, [mbok], 0);
        txtAporte.SetFocus;
        end;
     if md.qryAportaciones.State in [dsinsert, dsedit] then
        begin
          try
           md.qryAportaciones.Post;
           md.qryAportaciones.Insert;
           except
             txtNombre.setfocus;
          raise;
       end;
    end;
       txtRecibo.SetFocus
end;
end.

Gracias Faust
Responder Con Cita