Select Case e.DataCol.name Case "月份" If e.DataRow.Isnull("月份") = False Then Dim val As Integer = e.DataRow("月份") Dim Sum As Double Sum = Tables("销售收入预测表").Compute("Sum(月份_" & val & "_月销售额)") e.DataRow("销售_含流转税销售收入") = sum End IfEnd Select