源码如下,但一运行就出错请帮我找找问题。
procedure TUserLoginDlg.DBComboBox1Change(Sender: TObject);
var
SeekValue : string;
begin
SeekValue := UserLoginDlg.DBComboBox1.Text;
if Table1.FindKey([SeekValue]) then
UserLoginDlg.NameEdit.Text := Table1.FieldByName('Company').AsString;
procedure TUserLoginDlg.DBComboBox1Change(Sender: TObject);
var
SeekValue : string;
begin
SeekValue := UserLoginDlg.DBComboBox1.Text;
//select * from yourTable where yourFindKey=SeekValue
if query1.fieldbyname('yourFindKey').value<>'' then
UserLoginDlg.NameEdit.Text := query1.FieldByName('Company').AsString;