//
procedure Tmain
var
newform:Tsumaccount;
begin
if findForm(
begin
//若窗體不存在
newform:=Tsumaccount
newform
//在正式平衡表中使用
newform
end;
end;
//
procedure Tmain
var
pnum
begin
if application
begin
//獲得分錄表中的統計數據
adoquery
adoquery
pnum:=adoquery
inputsum:=adoquery
outputsum:=adoquery
//執行儲存過程
try
adocommand
adocommand
except
showmessage(
exit;
end;
//顯示成功信息
showmessage(
//刪除分錄表和憑證表
adocommand
adocommand
adocommand
adocommand
end;
end;
//
procedure Tmain
begin
if application
MB_OKCANCEL)=IDOK then
begin
try
adocommand
adocommand
except
showmessage(
exit;
end;
showmessage(
end;
end;
[
From:http://tw.wingwit.com/Article/program/Delphi/201311/25047.html