表达式IIF([始发网点名称] = '河北省邢台市',Parent(mn).标准名称,[始发网点名称])
代码
Dim 始发网点名称 As String
If 始发网点名称 <> ("河北省邢台市") Then
e.DataRow("结算网点1") = e.DataRow("始发网点名称")
Else
If e.DataCol.Name = "收件员名称" Then '如果内容发生变动的是产品列
If e.NewValue Is Nothing Then '如果新值是空白,也就是产品列的内容为空
e.DataRow("结算网点1") = Nothing '那么清空此行单价列的内容
Else
Dim dr As DataRow
'否则在产品表查找同名的产品行,将找到的行赋值给变量dr
dr = DataTables("标准网点名称").Find("[收件员名称] = '" & e.NewValue & "'")
If dr IsNot Nothing Then '如果找到了同名的产品行,也就是dr不是Nothing
e.DataRow("结算网点1") = dr("标准名称")
End If
End If
End If
End If
谁给看看我这代码哪错了,怎么不判断啊