响应的是OnEnter事件:
procedure TForm1.ComboBox1Enter(Sender: TObject);
begin
if not (Self.ComboBox1.Items.Count>0)
then with Self.Query1 do
begin
Close;
SQL.Clear;
Params.Clear;
SQL.Add('select work_order_number from data0006 order by work_order_number');
Open;
First;
Self.ComboBox1.Items.Clear;
if RecordCount>0
then while not Eof do
begin
Self.ComboBox1.Items.Add(Fields.Fields[0].AsString);
Next;
end;
Close;
end;
end;
为什么这个值work_order_number取不得啊?????
procedure TForm1.ComboBox1Enter(Sender: TObject);
begin
if not (Self.ComboBox1.Items.Count>0)
then with Self.Query1 do
begin
Close;
SQL.Clear;
Params.Clear;
SQL.Add('select work_order_number from data0006 order by work_order_number');
Open;
First;
Self.ComboBox1.Items.Clear;
if RecordCount>0
then while not Eof do
begin
Self.ComboBox1.Items.Add(Fields.Fields[0].AsString);
Next;
end;
Close;
end;
end;
为什么这个值work_order_number取不得啊?????
解决方案 »
- 如何获取指定窗口的某一点的颜色?
- 去除字符串不是A-Z和a-z与及0-9的字符..
- 请问我想根据给一个条件,如选择3月份,就查找3月份全部数据,这个SQL语句该怎么写?谢谢!
- ADO小问题!
- 急!请问如何把一个数组保存到数据库中的一个Blob字段中,又如何取出?
- 在delphi中如何实现中断
- fastreport 和reportbulide哪个更好用?
- 有谁知道这是什么主板?(高分赠送)
- 请大侠讲讲语音卡的编程?
- adotable 中的maxrecords如何用?
- 用循环向数据表中插入数据,为什么循环一次会插入两条相同的数据,最后一次循环插入一条数据???
- 关于ADOConnection1连接时的两个问题?有点难度....
2.onDropDown里写