unit Unit5;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Mask, DBCtrls;

type
  TForm5 = class(TForm)
    Label1: TLabel;
    DBEdit1: TDBEdit;
    DBEdit2: TDBEdit;
    Label2: TLabel;
    DBEdit3: TDBEdit;
    Label3: TLabel;
    DBEdit4: TDBEdit;
    Label4: TLabel;
    DBEdit5: TDBEdit;
    Label5: TLabel;
    Button1: TButton;
    procedure FormCreate(Sender: TObject);
    procedure FormActivate(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form5: TForm5;

implementation

uses Unit1, Unit2, Unit4;

{$R *.dfm}
procedure TForm5.FormCreate(Sender: TObject);
begin
Form4.ADOTable1.Last;
Form4.ADOTable1.Insert;
end;

procedure TForm5.FormActivate(Sender: TObject);
begin
dbedit1.SetFocus;
Form4.ADOTable1.First;
Form4.ADOTable1.Insert;
end;

procedure TForm5.Button1Click(Sender: TObject);
begin
if Form4.ADOTable1.Modified then
  begin
  Form4.ADOTable1.Post;
  Form5.Close;
  ShowMessage('Данные занесены в таблицу!');
  end;
end;






end.
 