差点忘了,这个代码下面还有这么几句代码,太多空行给漏掉了
If e.DataCol.Name = "熔铸编号" Then
Dim nms() As String = {"合金","坯料规格","当前规格","库位","流程","完成情况"}
If e.NewValue Is Nothing Then
For Each nm As String In nms
e.DataRow(nm) = Nothing
Next
Else
Dim dr As DataRow
dr = DataTables("生产").Find("[熔铸编号] = '" & e.NewValue & "'")
If dr IsNot Nothing
For Each nm As String In nms
e.DataRow(nm) = dr(nm)
Next
End If
End If
End If
Select Case e.DataCol.Name '自动填数据
Case "合金","坯料规格","当前规格","库位","流程","完成情况"
Dim Filter As String = "[熔铸编号] = '" & e.DataRow("熔铸编号") & "'"
DataTables("生产").ReplaceFor(e.DataCol.Name, e.NewValue, Filter)
End Select
[此贴子已经被作者于2012-9-7 20:53:51编辑过]