代码:If e.Col.Name = "产品类型" OrElse e.Col.Name = "订单日期" Then
If e.Row.IsNull("产品类型") OrElse e.Row.IsNull("订单日期") Then
e.Row("产品编号") = Nothing
Else
If e.Row.IsNull("产品类型") = False AndAlso e.Row.IsNull("订单日期") = False Then
e.Row("产品编号") = Nothing
Dim s0 As String = e.Row("产品类型")
Dim s As String = s0 & format(e.Row("订单日期"),"MMdd") '只修改了这个地方···
Dim i1 As String = e.Table.Compute("Max(产品编号)", "[订单日期] = #" & e.Row("订单日期") & "#" )
Dim n As Integer
If s = left(i1,6) Then
n=CInt(right(i1,3))
Else
n=0
End If
s= s & format(n+1,"000")
e.Row("产品编号")=s
End If
End If
End If
中,红显的二句语句是什么意思?
为什么在"产品类型"录入从2A到3A时编号正常,再从“3A”回到录入2A就不能正常编号?要能正常编号代码该怎么写?请指教,谢谢!