with adoquery1 do begin close; sql.Clear; sql.Text:='select sum(AMT) as Thj from sb_tsjh where ldlp_no='+quotedstr(combobox1.Text+'') ; open; EDIT1.Text:= FieldByName('Thj').AsString + ' 元';
----------------------------------------------
我是菜鸟!
你这句话怎么这么奇怪啊? sql.Text:='select sum(AMT) as Thj from sb_tsjh where ldlp_no='+quotedstr(combobox1.Text+'') ; 应该是这个样子吧? sql.Text:='select sum(AMT) as Thj from sb_tsjh where ldlp_no='''+quotedstr(combobox1.Text)+'''' ;