begin
table1.post;
table1.refresh;
no:=1;
table1.first;
with table1 do
begin
while not eof do
begin
showmessage(inttostr(no));
if no<10 then r:='00'+inttostr(no)
else
if (no>9) and (no<100) then r:='0'+inttostr(no)
else
if (no>99) and (no<1000) then r:=inttostr(no);
edit;
fieldbyname('序号').asstring:=loginform.bm+r;
post;
no:=no+1;
next;
end;
end;