
08.09.2011, 14:56
|
Начинающий
|
|
Регистрация: 27.05.2009
Сообщения: 100
Репутация: -1277
|
|
Цитата:
Сообщение от NumLock
Код:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, DB, DBTables;
type
TForm1 = class(TForm)
CheckBox1: TCheckBox;
CheckBox2: TCheckBox;
CheckBox3: TCheckBox;
CheckBox4: TCheckBox;
Button1: TButton;
Query1: TQuery;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
Tag:=0;
Tag:=Tag+Integer(CheckBox1.Checked);
Tag:=Tag+Integer(CheckBox2.Checked);
Tag:=Tag+Integer(CheckBox3.Checked);
Tag:=Tag+Integer(CheckBox4.Checked);
case Tag of
0: Query1.SQL.Text:='select 0';
1: Query1.SQL.Text:='select 1';
2: Query1.SQL.Text:='select 2';
3: Query1.SQL.Text:='select 3';
4: Query1.SQL.Text:='select 4';
end;
end;
end.
|
А куда тут запрос вписывать?
|