unit Unit8;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, DB, ADODB, Grids, DBGrids;

type
  TForm8 = class(TForm)
    DataSource1: TDataSource;
    DBGrid1: TDBGrid;
    ADOTable1: TADOTable;
    ADOTable1DSDesigner: TWideStringField;
    ADOTable1DSDesigner2: TIntegerField;
    ADOTable2: TADOTable;
    DBGrid2: TDBGrid;
    DataSource2: TDataSource;
    ADOTable2DSDesigner: TDateTimeField;
    ADOTable2DSDesigner1_: TIntegerField;
    ADOTable2DSDesigner2_: TIntegerField;
    GroupBox1: TGroupBox;
    Label1: TLabel;
    Edit1: TEdit;
    DataSource3: TDataSource;
    DBGrid3: TDBGrid;
    ADOTable3: TADOTable;
    ADOTable3_: TWideStringField;
    procedure Edit1Change(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form8: TForm8;

implementation

{$R *.dfm}

procedure TForm8.Edit1Change(Sender: TObject);
begin
  begin
      if Length(Edit1.Text) > 0 then
        begin
        ADOTable1.Filtered:=false;
        ADOTable1.Filter:='№_Товара=' + #39 + Edit1.text + #39;
        ADOTable1.Filtered:=true;
        end
        else
        ADOTable1.Filtered:=false;
        ADOTable2.Filtered:=false;
  end;
  begin
      if Length(Edit1.Text) > 0 then
        begin
        ADOTable2.Filtered:=false;
        ADOTable2.Filter:='№_Товара=' + #39 + Edit1.text + #39;
        ADOTable2.Filtered:=true;
        end
        else
        ADOTable2.Filtered:=false;
   end;
  begin
      if Length(Edit1.Text) > 0 then
         begin
         ADOTable3.Filtered:=false;
         ADOTable3.Filter:='№_Товара=' + #39 + Edit1.text + #39;
         ADOTable3.Filtered:=true;
         end
         else
         ADOTable3.Filtered:=false;
         end
   end;


end.
