procedure TForm1.Button2Click(Sender: TObject);
begin
adoquery1.sql.clear;
adoquery1.sql.add('select sum(收入-支出 )as sm from water1 where 审批人=edit3.text');
adoquery1.open;
edit2.Text:=adoquery1.fieldbyname('sm').asstring;
end;
麻烦看一下,提示:edit3.text没有初始值.