求助
我有两张标,
表A, id,权利义务_甲方,
表B 类型ID,相关方,权利义务,
现在需要统计,表A ID=表单B,表A中【权利义务_甲方】等于表B中【相关方】=‘甲方’的权利义务
下面代码,需要怎么修改
If e.DataCol.Name = "ID" Then
Dim Filter As String = "[类型ID] = '" & e.NewValue & "'"
e.DataRow("权利义务_甲方") = DataTables("权利义务").GetComboListString("权利义务", Filter, "排序").replace("|", vbcrlf)
End If
If e.DataCol.Name = "ID" Then
Dim Filter As String = "[类型ID] = '" & e.NewValue & "' and 相关方='甲方'"
e.DataRow("权利义务_甲方") = DataTables("权利义务").GetComboListString("权利义务", Filter, "排序").replace("|", vbcrlf)
End If
If e.DataCol.Name = "ID" Then
Dim Filter As String = "[类型ID] = '" & e.NewValue & "'"
e.DataRow("权利义务_甲方") = DataTables("权利义务").GetComboListString("权利义务", Filter, "排序").replace("|", vbcrlf)
End If
上述的
ID 如需要换成 2个列名(单位ID,场所ID),
类型ID 如需要换成 2个列名(单位类型ID,场所类型ID), 这个不通过表内组合两个列名,还有其他方法?如有,该如何编码
If e.DataCol.Name = "单位类型ID" orelse e.DataCol.Name = "场所类型ID" Then
Dim Filter As String = "[单位类型ID] = '" & e.datarow("单位类型ID") & "' and [场所类型ID] = '" & e.datarow("场所类型ID") & "'"
e.DataRow("权利义务_甲方") = DataTables("权利义务").GetComboListString("权利义务", Filter, "排序").replace("|", vbcrlf)
End If