Ok, Este es mi codigo
Código Delphi
[-]procedure TF_Principal.Button1Click(Sender: TObject);
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;
Disculpen no me explique bien en cuanto el error..El error me lo da cuando copio ese mismo código en el evento Enter del edit.
Con los tips que me han dado aquí para llamar el método simplemente no hace nada. El programa corre perfectamente pero cuando le doy Enter no ejecuta nada.
Gracias por su colaboración
Saludos...