Ver Mensaje Individual
  #3  
Antiguo 08-11-2006
Avatar de Lonidas
Lonidas Lonidas is offline
Miembro
 
Registrado: abr 2006
Posts: 35
Reputación: 0
Lonidas Va por buen camino
Hola
Poliburro tiene razón te conviene hacer una consulta SQL para filtrar

Esto seria lo que quieres hacer

Código Delphi [-]
procedure TForm1.Edit1Change(Sender: TObject);
begin
if edit1.Text ='' then  //**desactivo el filtro si no hay escrito nada
begin
table1.Active:=false;
table1.Filtered:=false;
table1.Active:=true;
end
else
begin
table1.Active:=false;
table1.Filtered:=false;
table1.Filter :='Descripcion='+QuotedStr(edit1.text+'*'); //** Descripcion seria el campo por el que vas a filtrar..
table1.Filtered:=true;
table1.Active:=true;
end;
end;


O también podrías posicionarte en el registro en lugar de filtrarlo
Código Delphi [-]
procedure TForm1.Edit1Change(Sender: TObject);
begin
table1.Locate('descripcion',edit1.Text ,[loPartialKey]); //** Descripcion seria el campo en el que vas a posicionarte
end;


Saludos....

Última edición por Lonidas fecha: 08-11-2006 a las 15:53:39.
Responder Con Cita