Dim Filter As String
Dim Zhichu As Double
Dim ShouRu As Double
Dim y As Integer = Date.Today.Year
Dim m As Integer = Date.Today.Month + 1
Dim FirstDay As New Date(y, m, 1)
e.Form.Controls("Label6").text = m
Dim LastDay As New Date(y, m, Date.DaysInMonth(y, m))
Filter = "日期 >= #" & FirstDay & "# And 日期 <= #" & LastDay & "#"
msgbox(filter)
ShouRu = DataTables("收入表").SqlCompute("Sum(收入金额)",Filter)
Zhichu = DataTables("支出表").SqlCompute("Sum(支出金额)",Filter)
e.Form.Controls("Label7").text = Format(Shouru,"c")
e.Form.Controls("Label8").text = Format(Zhichu,"c")