cmbCondition.Enabled := not (SameText(S, 'type') or SameText(S, 'shoufei'));//看不

  • 主题发起人 主题发起人 pchddcat
  • 开始时间 开始时间
P

pchddcat

Unregistered / Unconfirmed
GUEST, unregistred user!
cmbCondition.Enabled := not (SameText(S, 'type') or SameText(S, 'shoufei'));//看不明白(0分)<br />shoufei,type是表的字段
procedure TForm1.cmbFieldChange(Sender: TObject);
var
S: string;
begin
S := cmbField.Text;
cmbCondition.Enabled := not (SameText(S, 'type') or SameText(S, 'shoufei'));
if not cmbCondition.Enabled then
begin
cmbCondition.ItemIndex := 0;
// text = '='
with ADOQuery2 do
begin
if SameText(S, 'shoufei') then
S := '项目';
cmbParam.Items.Clear;
if Active then
Close;
SQL.Text := 'select * from ' + S;
Open;
First;
while not Eof do
begin
cmbParam.Items.Add(Fields[1].AsString);
Next;
end;
cmbParam.Style := csDropDownList;
cmbParam.ItemIndex := 0;
Close;
end;
end else
begin
cmbParam.Style := csDropDown;
cmbParam.Text := '';
end;
end;

 
后退
顶部