oolean);
ns: string;
Accept: = true;
with Filter do begin
if Group <>'' then
Accept: = Accept and (tbStudent.Lookup ('НС', tbUspev.FieldByName ('НС'). AsString, 'НГ') = Group);
if FIO <>'' then
Accept: = Accept and (tbUspev.FieldByName ('НС'). AsString =
tbStudent.Lookup ('ПІБ', FIO, 'НС'));
if Subject <>'' then
Accept: = Accept and (tbUspev.FieldByName ('КП'). AsString =
tbPredm.Lookup ('НП', Subject, 'КП'));
Accept: = Accept and (tbUspev.FieldByName ('Датас'). AsDateTime> = fDate);
Accept: = Accept and (tbUspev.FieldByName ('Датас'). AsDateTime <= lDate);
end;;. Unit3;
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, ComCtrls;
TForm3 = class (TForm)
GroupBox1: TGroupBox;
Edit2: TEdit;
DateTimePicker1: TDateTimePicker;
Edit3: TEdit;
BitBtn1: TBitBtn;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
DateTimePicker2: TDateTimePicker;
Label5: TLabel;
Button1: TButton;
procedure BitBtn1Click (Sender: TObject);
procedure FormCreate (Sender: TObject);
procedure Button1Click (Sender: TObject);
private
FirstDate: TDateTime;
end;
Form3: TForm3; Unit2;
{$ R *. dfm} TForm3.BitBtn1Click (Sender: TObject);
with Filter do begin
FIO: = Edit2.Text;
Subject: = Edit3.Text;
fDate: = DateTimePicker1.DateTime;
lDate: = DateTimePicker2.DateTime;
end;; TForm3.FormCreate (Sender: TObject);
with DataModule2.qFirstDate do begin
Active: = true;
First;
FirstDate: = Fields [0]. AsDateTime;
Active: = false;
end;
DateTimePicker1.DateTime: = FirstDate;
DateTimePicker2.DateTime: = date ();; TForm3.Button1Click (Sender: TObject);
edit2.Clear;