自动编号出现错误。类似001之类的编号
Dim max As String
Dim idx As Integer
max = e.DataTable.Compute("Max(编号)","# And [_Identify] <> " & e.DataRow("_Identify"))
If max > "" Then '如果存在最大编号
idx = CInt(max.Substring(3,3)) + 1 '获得最大编号的后三位顺序号,并加1
e.DataRow("编号") = Format(idx,"000")
Else
idx = 001 '否则顺序号等于1
End If