Dim ppsjs As List(of DataRow) = DataTables("比对表").Select("会员名称 ='" & e.Form.Controls("ComboBox1").value & "'")
For Each ppsj As DataRow In ppsjs
Select Case ppsj("有效性")
Case "精确"
Dim pggp As DataRow= DataTables("产品目录").find("产品标识 = '" & ppsj("标准编码") & "'")
IF pggb IsNot Nothing Then
Dim yyrkl As Double = DataTables("会员入库").Compute("sum(转换数量)","标准编码 ='" & ppsj("标准编码") & "' and 会员名称 ='" & e.Form.Controls("ComboBox1").value & "' and 可用性 = 1 and 入库时间 >= #" & pggp("报废时间") & "#")
End If
End Select
Next
理由:
http://www.foxtable.com/help/topics/2044.htm