Dim Filter1 As String = "1=1"
Dim Filter2 As String = "1=1"
With RibbonTabs("报价管理")("历史报价查询").Items("txt_报价单号")
If .Value IsNot Nothing Then
Filter1 &= " and 报价单号 = '" & .Value & "'"
End If
End With
With RibbonTabs("报价管理")("历史报价查询").Items("txt_报价人")
If .Value IsNot Nothing Then
Filter1 &= " and 报价人 = '" & .Value & "'"
End If
End With
With RibbonTabs("报价管理")("历史报价查询").Items("txt_客户简称")
If .Value IsNot Nothing Then
Filter1 &= " and 客户简称='" & .Value & "'"
End If
End With
With RibbonTabs("报价管理")("历史报价查询").Items("txt_报价日期1")
If .Value IsNot Nothing Then
Filter1 &= " and 报价日期 >=#" & .Value & "#"
End If
End With
With RibbonTabs("报价管理")("历史报价查询").Items("txt_报价日期2")
If .Value IsNot Nothing Then
Filter1 &= " and 报价日期 <=#" & .Value & "#"
End If
End With
With RibbonTabs("报价管理")("历史报价查询").Items("txt_材质")
If .Value IsNot Nothing Then
Filter2 &= " and 材质 = '" & .Value & "'"
End If
End With
With RibbonTabs("报价管理")("历史报价查询").Items("txt_产品类型")
If .Value IsNot Nothing Then
Filter2 &= "and 产品类型 ='" & .Value & "'"
End If
End With
With RibbonTabs("报价管理")("历史报价查询").Items("txt_产品")
If .Value IsNot Nothing Then
Filter2 &= "and 产品类型 Like '%" & .Value & "%'"
End If
End With
Dim str As String = DataTables("国内报价单明细表").GetComboListString("报价单号", filter2)
str = str.Replace("|", "','")
Tables("国内报价单表").Filter = Filter1 & " and 报价单号 in ('" & str & "')"
str = DataTables("国内报价单表").GetComboListString("报价单号", Tables("国内报价单表").Filter)
str = str.Replace("|", "','")
Tables("国内报价单明细表").Filter = Filter2 & " and 报价单号 in ('" & str & "')"