各位,我已经将dbcombobox连接到数据库某个字段,我想做的是下拉选择dbcombobox中显示的字段的一个值,然后这条记录相关的其它字段能显示在窗体起它的edit中
       with table1 do
    begin
       close;
       open;
       SetKey;
       index:=dbcombobox1.itemindex;
       FieldByName('receiver').asstring:=dbcombobox1.Items.Strings[index];
       if not GotoKey then
       begin
          showmessage('该帐号没有登记,请输入详细信息.');
          edit6.SetFocus;
         // break;
       end else if GotoKey then.......
可是无论我选择那个值dbcombobox1.itemindex的值老是不变,因此dbcombobox1.Items.Strings[index]就不对请问着是为何呢?