Ver Mensaje Individual
  #8  
Antiguo 17-10-2011
Avatar de defcon1_es
defcon1_es defcon1_es is offline
Miembro
 
Registrado: mar 2004
Ubicación: Cuenca - España
Posts: 533
Reputación: 23
defcon1_es Va por buen camino
¿Y no sería más claro y sencillo crear un procedimiento con el código que necesites?

Ejp:

Código Delphi [-]
procedure TF_Principal.MiProcedimiento;
Var Codigo: String;
begin
Codigo := EditCodigo.Text;
with DataM.MyQuery do
  begin
    SQL.Clear;
    SQL.Add('SELECT * FROM SFixed');
    SQL.Add('WHERE');
    SQL.Add('FX_CODIGO = :Codigo');
    SQL.Add('AND SFIXED.FX_TIPO =  :9');
    ParamByName('Codigo').AsString:= Codigo;
    ParamByName('9').AsString:= '9';
    RequestLive := true;
    Open;
    While EditCodigo.Text <> '' do
    begin
    IF  (FieldByName('FX_CODIGO').AsString <> Codigo)  then
       begin
       ShowMessage('El Accionista No Existe Pasar Por Administración');
       L_Aprobado.Visible := False;
       end;
    IF  (FieldByName('FX_CODIGO').AsString = Codigo)  AND (FieldByName('FX_SALDO').AsCurrency > 0) then
       begin
       ShowMessage('El Accionista Presenta Deuda Pasar Por Administración');
       L_Aprobado.Visible := False;
       end;
    IF  (FieldByName('FX_CODIGO').AsString = Codigo)  AND (FieldByName('FX_SALDO').AsCurrency = 0) then
       begin
       L_Aprobado.Visible := True;
       end;
    Break;
    end;
       IF  EditCodigo.Text = ''  then
          begin
          ShowMessage('Por Favor Ingrese ID del Accionista');
          end;
  end;
end;

y lo llamas cuando y donde lo necesites:

Código Delphi [-]
procedure TF_Principal.edt1KeyUp(Sender: TObject; var Key: Word;   Shift: TShiftState); 
begin   
  if (Key= vk_return) then     
    MiProcedimiento; 
end;

procedure TF_Principal.edt1Enter(Sender: TObject); 
begin   
  MiProcedimiento; 
end;
__________________
Progress Openedge
https://abevoelker.com/progress_open...dered_harmful/


Delphi forever...

Última edición por defcon1_es fecha: 17-10-2011 a las 13:59:12.
Responder Con Cita