Year的问题Dim km As String = e.DataRow("科目")
Dim dd As Date = e.DataRow("日期")
Dim year As Integer = dd.Year
Dim month As Integer =dd.Month
Dim dr As DataRow
dr = DataTables("记账").find("项目名称 like '*工资' And 科目 = '" & km & "' And year(日期) = " & year & " And month(日期) =" & month )
If dr IsNot Nothing
dr("支出") = DataTables("工资表").SQLCompute("sum(应发工资)","科目 = '" & km & "' And year(日期) = " & year & " And month(日期) =" & month)
MessageBox.Show(dr("支出") & dr("日期") & dr("项目名称"))
dr.Save
End If
执行时,year出错
此主题相关图片如下:捕获.png
