dblistbox中显示的数据库中某表的数据,因此直接用table.locate(字段名,字段值,locate参量)就可以实现了,例如:locate ('代码;号码',vararrayof([edit1.text,code]),[locaseinsensitive])

解决方案 »

  1.   

    上面的给出的代码中漏了一点,应该是
    locate('代码;号码',vararrayof([edit1.text,code]),[locaseinsensitive,loPartialKeylocate ])
      

  2.   

    我要求在EDIT中一边输入,LISTBOX中就一边反映所输入的内容。
      

  3.   

    我已经能在EDIT中输入内容,在DBLookupListbox中也能显示与EDIT中匹配的内容,但如何在DBLookupListbox中将匹配的内容高亮度显示?我在EDIT的ONCHANGE事件中加上如下代码:
    procedure TfrmSampledata.Edit1Change(Sender: TObject);
    begin
    adoSampledata.Locate('description',edit1.Text,[locaseInsensitive,loPartialKey]);
    end;
    请问如何修改,使查到内容能在DBLOOKUPLISTBOX中高亮度显示?解决后马上给分。
      

  4.   

    ADOQuery1.Locate('fdNO','00001',[loPartialKey]);
    DBLookupListBox1.KeyValue:=ADOQuery1.FieldByName('fdNO').Asstring;