各位,我已经将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]就不对请问着是为何呢?
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]就不对请问着是为何呢?
解决方案 »
- delphi如何定义动态数组??
- 获取SQL Server服务器列表发现的问题?
- [散分]今年过年CSDN流行散分,我也来发发红包
- fastreport具挑战性问题一个
- [新手请教]函数返回的是对象时,返回的是值还是地址。
- ado怎么和excel建立连接,急用,请各位高手帮帮忙,好吗
- 怎么样将Excel中的数据赋给Delphi中的变量
- 各位进来看看有关与dll文件的问题!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- 刚刚的问题,再问一下(hlep!!)
- 为什么访问不了CSDN的专家门诊????
- #####字体和输入法怎么解决?????
- 初学Delphi遇到几个问题!求教!
FieldByName('receiver').asstring:=dbcombobox1.text;