ість на складі], Склад. [Дата поставки] ); DataModule2.ADOQuery1.SQL.Add ( FROM Постачальники INNER JOIN (Склад INNER JOIN Ліки ON Склад. [Ключ]=Ліки. [Ключ]) ON Постачальники. [Код постачальника]=Склад. [Код постачальника] ); DataModule2.ADOQuery1.SQL.Add ( WHERE Постачальники. [Код постачальника] LIKE + Edit2.Text + ); DataModule2.ADOQuery1.Active:=true; Form10.ShowModal; end; procedure TForm1.DBLookupComboBox1Click (Sender: TObject); begin DataModule2.ADOQuery3.Active:=false; DataModule2.ADOQuery3.SQL.Clear; DataModule2.ADOQuery3.SQL.Add ( Select Ліки. [Ключ], Ліки. [Ціна] ); DataModule2.ADOQuery3.SQL.Add ( FROM Ліки ); DataModule2.ADOQuery3.SQL.Add ( WHERE Ліки. [Ключ] LIKE + DBEdit6.Text + ); DataModule2.ADOQuery3.Open; DBEdit3.Text:=DataModule2.ADOQuery3.FieldValues ??[ Ціна ]; DataModule2.ADOQuery3.Active:=True; DataModule2.ADOTable6.Refresh; end; end. unit Unit2; interface uses SysUtils, Classes, DB, ADODB; type TDataModule2=class (TDataModule) ADOConnection1: TADOConnection; ADOTable1: TADOTable; DataSource1: TDataSource; ADOTable2: TADOTable; DataSource2: TDataSource; ADOTable1DSDesigner: TAutoIncField; ADOTable1DSDesigner3: TWideStringField; ADOTable1DSDesigner5: TDateTimeField; ADOTable1DSDesigner6: TBCDField; ADOTable2DSDesigner: TAutoIncField; ADOTable2DSDesigner2: TDateTimeField; ADOTable2DSDesigner3: TWideStringField; ADOTable2DSDesigner4: TWideStringField; ADOTable3: TADOTable; ADOTable4: TADOTable; ADOTable5: TADOTable; DataSource3: TDataSource; DataSource4: TDataSource; DataSource5: TDataSource; ADOTable1DSDesigner2: TWideStringField; ADOTable2DSDesigner6: TIntegerField; ADOTable3DSDesigner: TWideStringField; ADOTable3DSDesigner2: TWideStringField; ADOTable3DSDesigner3: TWideStringField; ADOTable3DSDesigner4: TWideStringField; ADOTable3DSDesigner5: TWideStringField; ADOTable4DSDesigner: TAutoIncField; ADOTable4DSDesigner2: TWideStringField; ADOTable5DSDesigner: TAutoIncField; ADOTable5DSDesigner2: TWideStringField; ADOTable6: TADOTable; DataSource6: TDataSource; ADOTable6DSDesigner: TAutoIncField; ADOTable6DSDesigner2: TDateTimeField; ADOTable6DSDesigner3: TIntegerField; ADOTable6DSDesigner5: TWideStringField; ADOTable6DSDesigner6: TBCDField; ADOTable6Field: TIntegerField; ADOQuery1: TADOQuery; DataSource7: TDataSource; ADOTable2_: TWideStringField; ADOQuery2: TADOQuery; DataSource8: TDataSource; ADOQuery3: TADOQuery; DataSource9: TDataSource; ADOQuery4: TADOQuery; procedure ADOTable6CalcFields (DataSet: TDataSet); private {Private declarations} public {Public declarations} end; var DataModule2: TDataModule2; implementation uses Unit9; {$ R * .dfm} procedure TDataModule2.ADOTable6CalcFields (DataSet: TDataSet); begin DataModule2.ADOTable6Field.Value:=DataModule2.ADOTable6DSDesigner6.AsInteger*DataModule2.ADOTable6DSDesigner3.AsInteger; end; end. unit Unit3; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Mask, DBCtrls, ComCtrls, Buttons, ExtCtrls; type TForm3=class (TForm) DBEdit1: TDBEdit; Label1: TLabel; Label2: TLabel; Label3: TLabel; Label4: TLabel; DBLookupComboBox1: TDBLookupComboBox; DBEdit2: TDBEdit; BitBtn1: TBitBtn; DBEdit3: TDBEdit; DBEdit4: TDBEdit; DBEdit5: TDBEdit; DBEdit6: TDBEdit; DBEdit7: TDBEdit; Label5: TLabel; Label6: TLabel; Label7: TLabel; Label8: TLabel; Label9: TLabel; DBLookupComboBox2: TDBLookupComboBox; Image1: TImage; Label10: TLabel; procedure BitBtn1Click (Sender: TObject); private {Private declarations} public {Public declarations} end; var Form3: TForm3; implementation uses Unit2, Unit1; {$ R * .dfm} procedure TForm3.BitBtn1Click (Sender: TObject); begin if DataModule2.ADOTable1.Modified then DataModule2.ADOTable1.Post; if DataModule2.ADOTable2.Modified then DataModule2.ADOTable2.Post; Close; end; end. unit Unit4; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Grids, DBGrids, Menus, StdCtrls; type TForm4=class (TForm) DBGrid1: TDBGrid; Button1: TButton; Button2: TButton; Button3: TButton; Button4: TButton; procedure FormClose (Sender: TObject; var Action: TCloseAction); procedure Button1Click (Sender: TObject); procedure Button2Click (Sender: TObject); procedure Button3Click (Sender: TObject); procedure Button4Click (Sender: TObject); private {Private declarations} public {Public declarations} end; var Form4: TForm4; implementation uses Unit2, Unit5, Unit1, Unit3; {$ R * .dfm} procedure TForm4.FormClose (Sender: TObject; var Action: TCloseAction); begin if DataModule2.ADOTable3.Modified then DataModule2.ADOTable3.Post; end; procedure TForm4.Button1Click (Sender: TObject); begin DataModule2.ADOTable3.Edit; DataModule2.ADOTable3.Insert; Form5.Show; end; procedure TForm4.Button2Click (Sender: TObject); begin Form5.Show; end; procedure TForm4.Button3Click (Sender: TObject); begin if Application.MessageBox (...