编号增加
Select PO1
Locate For Alltrim(sup_no)==Alltrim(Thisform.txtno.Value)
If Found()
Thisform.txtpo.Value=po
Else
Calculate Max(po) To ID1
Select npo
Calculate Max(po) To ID2 For Substr(po,1,2)="C-"
If ID1>ID2
_ID=ID1
Else
_ID=ID2
Endif
IDD=Val(Right(_ID,4))
IF Val(Substr(Dtos(Date()),4,3))>Val(Substr(_ID,4,3))
_ID="C-"+"A"+Substr(Dtos(Date()),4,3)+"-"+"0001"
ELSE
_ID="C-"+"A"+Substr(Dtos(Date()),4,3)+"-"+Padl(Allt(Str(IDD+1)),4,'0')
Endif
请看看什么问题,到了100就不会自增了,什么原因啊?郁闷