请教个统计问题,用交叉统计不能解决,望各位提供下思路
想统计品种,在状态1 和状态2 下,入库数减出库数,
交叉统计统计了入库数+出库数
谢谢
[此贴子已经被作者于2011-5-7 0:11:31编辑过]
你这表结构不严谨吧.
If e.DataCol.Name = "品种" Then
If e.DataRow.IsNULL("状态b") Then
Dim Index As Integer
Index = Tables("表A").FindRow(e.DataRow)
If Index > -1 Then '如果找到此行
Tables("表A").Position = Index '将焦点定位到此行
End If
e.DataRow("数量")= e.DataRow("数量")-e.DataRow("数量")
End If
End If
你刷新品种列试试,对不对的?