Ver Mensaje Individual
  #2  
Antiguo 23-07-2010
cloayza cloayza is offline
Miembro
 
Registrado: may 2003
Ubicación: San Pedro de la Paz, Chile
Posts: 914
Reputación: 23
cloayza Tiene un aura espectacularcloayza Tiene un aura espectacular
Podria ser asi:

Deberias agregar un ComboBox el cual contendra los campos de indices.

Código Delphi [-]
procedure TForm1.FormActivate(Sender: TObject);
begin
      ComboBox1.Items.Clear;
      ComboBox1.Items.Add('Company');
      ComboBox1.Items.Add('CustNo');
      ComboBox1.Style:=csDropDownList;
      ComboBox1.ItemIndex:=0;
      
      Table1.DatabaseName := 'DBDemos';
      Table1.TableName := 'Customer.db';
      Table1.Active := True;
      Table1.IndexFieldNames := ComboBox1.Text;
end;

procedure TForm1.ComboBox1Change(Sender: TObject);
begin
     Edit1.Text:='';
     Edit1.SetFocus;
     Table1.IndexFieldNames:=ComboBox1.Text;
end;

procedure TForm1.Edit1Change(Sender: TObject);
begin
     Table1.FindNearest([edit1.text]);
end;

Saludos
Responder Con Cita