-- 作者:sxqq123
-- 发布时间:2013/6/5 9:11:00
-- 不清楚代码问题,请教
此主题相关图片如下:qq图片20130605090947.jpg
分解入库_DataColChanged
If e.DataCol.Name = "单价" OrElse e.DataCol.Name = "数量" Then
e.DataRow("金额") = e.DataRow("单价") * e.DataRow("数量")
End If
\'If e.DataCol.Name = "物资名称" Then \'
\'If e.NewValue Is Nothing Then
\'e.DataRow("物资类别") = Nothing
\'Else
\'Dim dr As DataRow
\'dr = DataTables("分解数据").Find("[物资名称] = \'" & e.NewValue & "\'")
\'If dr IsNot Nothing Then
\'e.DataRow("物资类别") = dr("物资类别")
\'End If
\'End If
\'End If
\'
Dim dt As Date = e.DataRow("入库日期")
If dt.Day < 26 Then
dt = dt.AddMonths(-1)
End If
Dim dt1 As Date = New Date(dt.Year,dt.Month ,26)
Dim dt2 As Date = dt1.AddMonths(1).AddDays(-1)
Dim Filter As String
Filter = "入库日期 >= #" & dt1 & "# And 入库日期 <= #" & dt2 & "#"
Tables("分解入库").Filter = Filter
|