请各位指教。我在线学习中。谢谢 。

解决方案 »

  1.   

    //动态添加表的字段名:
    var i:integer;
    begin
      Table1.open;
      ComboBox1.Items.Clear;
      with Table1 do
      begin
        for i:=0 to FieldCount-1 do
        ComboBox1.Items.Add(Fields[i].FieldName)
      end;
      table1.close;
    end;
    //动态添加表中某字段的值:
    begin
      with Table1 do
      begin
        open;
        first;
        while not eof do
        begin
          ComboBox1.Items.Add(fieldbyname('aaa').AsString);
          next;
        end;
      end;
    end;以上Table可以改成query
      

  2.   

    晚了,被人抢了, jixinfa(DELHPI程序员) 说的真详细!
    就是这样的,可以结贴了!