我怎么也想不通这段代码又什么问题!!!!!!
编译能通过,就是有能执行table1.post;总是2有问题,不知2有什么问题
bitbtn1.Tag:=6;
dbedit8.tag:=1;dbcombobox1.tag:=2;dbmemo1.tag:=3;
for i:=0 to tform.ComponentCount-1 do
begin
table1.Edit;
case tform.Components[i].Tag of
1:
if (trim(dbedit8.Text)='') then
application.MessageBox('申请人不能为空,请重新输入','输入错误',mb_ok)
else
bitbtn1.Tag:=bitbtn1.Tag+1;
2:
if (trim(dbcombobox1.Text)='') then
application.MessageBox('加班类型不能为空,请重新输入','输入错误',mb_ok)
else
bitbtn1.Tag:=bitbtn1.Tag+1;
3:
if (trim(dbmemo1.Text)='') then
application.MessageBox('何事加班不能为空,请重新输入','输入错误',mb_ok)
else
bitbtn1.Tag:=bitbtn1.Tag+1;
9:
table1.Post;
end;
end;